Warptweet Posted January 12, 2007 Share Posted January 12, 2007 Hi there, I use this code to make a file...[code]<?php$o = fopen($_POST['uploadedfile'].".txt", "w");fclose($o);?>[/code]How can I make it so that the file is created in the /flashportal/uploads directory?If its impossible to choose which directory to create a file in, how can I MOVE the file into a directory?SECOND QUESTION:Is it possible to write HTML code or PHP code onto a file? If so, how? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 12, 2007 Share Posted January 12, 2007 $o = fopen("/flashportal/uploads".$_POST['uploadedfile'].".txt", "w"); Quote Link to comment Share on other sites More sharing options...
zfred09 Posted January 12, 2007 Share Posted January 12, 2007 It is possible to write html to the file, check out the ob_start(output buffering) function on php.net. As far as writing PHP to the file I have no clue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.