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? 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 " 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'); 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! Link to comment https://forums.phpfreaks.com/topic/119571-solved-fopenissues-w/#findComment-616046 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.