phpretard Posted August 13, 2008 Share Posted August 13, 2008 I know the folder is being made but you can see the error I keep getting. Warning: fopen(pages/secure/documents/$folder/index.php) [function.fopen]: failed to open stream: No such file or directory $folder=$_POST['folder']; mkdir("pages/secure/documents/$folder", 0777); $fp = fopen('pages/secure/documents/$folder/index.php', 'w'); fclose($fp); It looks like fopen isn't picking up the variable (according to the error) any Ideas? Quote Link to comment https://forums.phpfreaks.com/topic/119571-solved-fopenissues-w/ Share on other sites More sharing options...
unkwntech Posted August 13, 2008 Share Posted August 13, 2008 $fp = fopen('pages/secure/documents/$folder/index.php', 'w'); It will not parse the variable because of the ' change it to " Quote Link to comment https://forums.phpfreaks.com/topic/119571-solved-fopenissues-w/#findComment-616029 Share on other sites More sharing options...
trq Posted August 13, 2008 Share Posted August 13, 2008 Variables are not interpolated within single quotes. $fp = fopen("pages/secure/documents/$folder/index.php", 'w'); Quote Link to comment https://forums.phpfreaks.com/topic/119571-solved-fopenissues-w/#findComment-616032 Share on other sites More sharing options...
phpretard Posted August 13, 2008 Author Share Posted August 13, 2008 Yeah! Quote Link to comment https://forums.phpfreaks.com/topic/119571-solved-fopenissues-w/#findComment-616046 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.