Making a file at public_html Dir
Posted: Mon Nov 15, 2004 1:01 pm
Sami | Help us, help you. Please use
Code: Select all
andCode: 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);