file creation error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Abha
Forum Newbie
Posts: 3
Joined: Wed Mar 25, 2009 11:42 am

file creation error

Post by Abha »

hi I have written the following line in my code to create a file and write data in it but, unable to do the same

Code: Select all

	@ $fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt",'ab');
i am getting an error...unable to create file permission denied...

i am working on windows vista...with ntfs file system...

please help!
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: file creation error

Post by twinedev »

What do you have $DOCUMENT_ROOT defined as? Are you meaning to use $_SERVER['DOCUMENT_ROOT'] ?

-Greg
Post Reply