Page 1 of 1

writing permissions

Posted: Thu May 19, 2005 11:42 pm
by nikhil.deshmukh
Hello Friends
I am new to php i had writen a code for writing a file

i am getting an error
Warning: fopen(jai.txt): failed to open stream: Permission denied in e:\inetpub\wwwroot\write.php on line 3
Couldn't create new file

is there any problem of rights

how to change it ....



code is..........

Code: Select all

<?php

$fp = fopen("jai.txt", "w") or die("Couldn't create new file");
$numBytes = fwrite($fp, "Hello, this is some text!");
fclose($fp);

echo "Wrote $numBytes bytes to newfile.file!";

?>
Jcart | Please review :arrow: Posting Code in the Forums

Posted: Fri May 20, 2005 7:34 am
by John Cartwright

Posted: Sat May 21, 2005 7:51 am
by n00b Saibot
8O chmod() on Windows o_O :?