Page 1 of 1

Making a file at public_html Dir

Posted: Mon Nov 15, 2004 1:01 pm
by lazerbri
Sami | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Hi Guys

I no you need to cmd a folder to 0777 to copy to it but I want to make a file on my public_html dir but dont want to change the cmd of this folder.

Is this possible.

Code: Select all

$url01 = $DOCUMENT_ROOT ."/test02.php";
$fd = fopen($url01, "w+") or die("Did not open file: " . $url01); 
$fw = fwrite($fd, "$text" )or die("Could not write to file: " . $url01);  
fclose($fd);

Posted: Mon Nov 15, 2004 1:57 pm
by John Cartwright
Change the permission, when done uploading or whatnot, change the permission back

Posted: Mon Nov 15, 2004 2:07 pm
by lazerbri
sorry I should of added its for a third party program