|
-
Mar 5th, 2007, 04:09 PM
#1
Thread Starter
Addicted Member
creating a file in a directory without everyone permissions
$File = sitemap.xml";
$Handle = fopen($File, 'w');
$Data="first line \n";
fwrite($Handle, $Data);
fclose($Handle);
the problem is it wont create the file unless the directory has everyone on write permissions
i dont want to put that permission in place mainly because this file needs to be created in the root of the website folder. how would i go about creating a file and putting it in the root of a website withouth changing the permissions. the php script that im using is also on the server under my admin tools.
thanks
-JLR
-
Mar 6th, 2007, 04:44 AM
#2
Re: creating a file in a directory without everyone permissions
You don't need to give everyone permission; you need to give the webserver permission. And there's absolutely no way around that.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|