fopen("$var/index.php","x") doesn't work
Posted: Tue Oct 25, 2011 8:57 am
Code: Select all
$file = fopen("./$l/index.php",'x');Code: Select all
$file = fopen("./".$l."/index.php",'x');A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$file = fopen("./$l/index.php",'x');Code: Select all
$file = fopen("./".$l."/index.php",'x');Whay you dont use fwrite and make "w+" for writing, that function will make your file. If you don't have created directory first use mkdir, after this fwrite.I'm calling the above function, wanting to create a file, that does not exist already.