dezkit Posted May 12, 2008 Share Posted May 12, 2008 is it possible so when i submit an input, it creates a php file in the root. <?php if(isset($_POST['submit'])) { // stuff 2 do } ?> <form action="<? $_SERVER['PHP_SELF']; ?>" method="post"> <table> <tr> <td>File Name: <td><input type="text" name="file">.php <tr> <td colspan=2 align=right><input type="submit" value="submit" name="submit" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/ Share on other sites More sharing options...
dezkit Posted May 12, 2008 Author Share Posted May 12, 2008 is this even php? Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/#findComment-539047 Share on other sites More sharing options...
BlueSkyIS Posted May 12, 2008 Share Posted May 12, 2008 can you clarify your problem? Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/#findComment-539049 Share on other sites More sharing options...
dezkit Posted May 12, 2008 Author Share Posted May 12, 2008 there is no problem, i just need a solution Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/#findComment-539059 Share on other sites More sharing options...
dezkit Posted May 12, 2008 Author Share Posted May 12, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/#findComment-539336 Share on other sites More sharing options...
wildteen88 Posted May 12, 2008 Share Posted May 12, 2008 PHP can create files if they don't exists with the fopen fwrite and fclose functions. Read the docs on these functions specifically the various modes fopen accepts. You'll need to make sure the directory you are creating the file in has sufficient write permissions. Quote Link to comment https://forums.phpfreaks.com/topic/105269-php-file/#findComment-539485 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.