writing permissions

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
nikhil.deshmukh
Forum Newbie
Posts: 7
Joined: Sun May 08, 2005 11:13 pm

writing permissions

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

8O chmod() on Windows o_O :?
Post Reply