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? Quote Link to comment 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'); Quote Link to comment 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 Quote Link to comment 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"; Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 23, 2008 Author Share Posted April 23, 2008 Thank you ! 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.