phpretard Posted April 23, 2008 Share Posted April 23, 2008 This names my page "$page.php"; instead of "some_page"; $page="some_page"; $fp = fopen("$page.php", 'w'); Does anyone know why? Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/ Share on other sites More sharing options...
micah1701 Posted April 23, 2008 Share Posted April 23, 2008 weird, are you sure you using "double quote" ? single quotes keep your var names literal. try $fp = fopen($page.".php", 'w'); Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/#findComment-525194 Share on other sites More sharing options...
phpretard Posted April 23, 2008 Author Share Posted April 23, 2008 This is copied straight from the page. It doesn't work $fp = fopen("$page.".php", 'w'); fclose($fp); $filename = "$page".php"; error Parse error: syntax error, unexpected '"' on line 11 Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/#findComment-525204 Share on other sites More sharing options...
The Little Guy Posted April 23, 2008 Share Posted April 23, 2008 $fp = fopen($page.".php", 'w'); fclose($fp); $filename = $page".php"; Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/#findComment-525206 Share on other sites More sharing options...
jonsjava Posted April 23, 2008 Share Posted April 23, 2008 <?php $fp = fopen($page.".php", "w"); fclose($fp); lol. he did the exact same as me, just faster. Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/#findComment-525207 Share on other sites More sharing options...
phpretard Posted April 23, 2008 Author Share Posted April 23, 2008 Thank you ! Link to comment https://forums.phpfreaks.com/topic/102571-fopenissues-w/#findComment-525236 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.