Thread: File write
View Single Post
  #1 (permalink)  
Old Aug 3rd, 2007, 12:47
alexgeek's Avatar
alexgeek alexgeek is offline
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,800
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Unhappy File write

Hey again

I'm writing a script so that i can type anything i want into a textarea then choose the file name and the file extension and submit it, it should then save it in a directory below called "files". I'm having a few problems with it though :/
here it is:
PHP: Select all

$filecode $_POST['code'];
$file $_POST['file'];
$ext $_POST['ext'];

 
$fp fopen("files/".$file.".".$ext"a+");
   
fwrite($fp"<html>".$filecode."</html>");
   
echo (
"success"); 
i get the echo. But no file appears. I have all permissions turned on the directory. I don't see the problem :s
Reply With Quote