Guest Smok3RS Odesláno: 24. Srpen, 2010 Share Odesláno: 24. Srpen, 2010 w - Otvori súbor pre zápis nových dát a jeho pôvodni text vymaže. w+ - Take iste ako w len už súbor ide čítať. r - Otvori súbor iba pre čítanie a umiestni ukazovateľ na začiatok súboru. r+ - Otvori súbor pre zápis i čítanie a ukazovateľ premiestni na začiatok súboru. a - Otvori súbor pre zápis nových dát a umiestni ukazovateľ na koniec súboru. a+ - Take iste ako a len už súbor ide čítať. Funkcia Unlink zmaže súbor. if(unlink("text.txt")) { echo"text.txt bol zmazaný"; } Funkcia Filesize zistí veľkost súboru v bajtov $velkost = filesize("text.txt"); echo"Veľkost súboru: $velkost"; Funkcia Rename zmeni názov súboru if(rename("text.txt","php.txt")) { echo"Súbor text.txt bol premenovaný na php.txt"; } $otvor = fopen("text.txt","w"); // Otvorí nám zadaný súbor text.txt fwrite($otvor,"Zdravim pawno"); // Zapíše nam niejaky text do text.txt fclose($otvor); // Zatvorí nám súbor Link to comment Share on other sites More sharing options...
Dennis 0 Odesláno: 24. Srpen, 2010 Share Odesláno: 24. Srpen, 2010 Celkom v poho ale toto sú základné funkcie php ... :thumbup: Link to comment Share on other sites More sharing options...
StarsCream_Cze 1 Odesláno: 24. Srpen, 2010 Share Odesláno: 24. Srpen, 2010 pro laamky dobrý, ale je to spíš práce se soubory, než s textem, změň název Link to comment Share on other sites More sharing options...
Guest Smok3RS Odesláno: 24. Srpen, 2010 Share Odesláno: 24. Srpen, 2010 pro laamky dobrý, ale je to spíš práce se soubory, než s textem, změň název Zmenil som názov Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 24. Srpen, 2010 Share Odesláno: 24. Srpen, 2010 Ja bych to vubec neumel Link to comment Share on other sites More sharing options...
Guest Navod Odesláno: 5. Leden, 2011 Share Odesláno: 5. Leden, 2011 kde to zijes? v praveku? existuji tyto funkce: file_put_contents ( string $filename , mixed $data [, int $flags = 0 [, resource $context ]] ) # vraci logickou hodnotu 1/0 file_get_contents ( string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen ]]]] ) # vraci string Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now