26.11.

:

chmod(),

fputs(),

rewind(),

f tsll()

, chmod (), . :.

int chmod (string filename, int mode)

, filename, , mode. , mode , . :

// ,

// , // ,

true, - false.

1 , ,(,"+") .

PHP 3 PHP 4.

, PHP , . - , , fputs (), . , . , fopen () . fputs ():

int fputs(int fp, string str[, int length])

str , , fp , fopen (). length , . 10 , a length 5, , , 5 , . length , . . str.

fputs () : <?php

$fp = fopen("Z:\\home\\localhost\\www\\newname.txt", "w"); fputs ($fp, " !", 15); fclose($fp);

readfile("Z:\\home\\localhost\\www\\newname.txt");

?>

, newname.txt . newname.txt 15 . :

15 .

fputs () length: <?php

$fp = fopen("Z:\\home\\localhost\\www\\newname.txt", "w") ; fputs($fp, " !"); fclose($fp);

readfile ("Z:\\horae\\localhost\\www\\newname.txt"), ;

?>

:

. fputs length. , fputs ().

fputs (> 3 4.

. . rewind (). :

int fp)

rewind () , fp, . 0.

, f open . :

<?php

$fp = fopen("dir/dirl/dir2/yourfile", "w"); rewind($fp); fclose($fp); ?>

ftell () , . . , f open (). ftell():

int ftelKint fp)

ftell , , fp. , .

ftell () false.

, f open () ( ) .

ftell rewind () PHP 3 PHP 4.