opels Posted April 4, 2007 Share Posted April 4, 2007 Hi there, I run the below code to create a new php file $fp2 = fopen("a.php", "w"); $P1= "<?php include (\"template.php\"); ?>"; fwrite ($fp2, $P1); fclose ($fp2); when I then display a.php in ie, I get a blank page if I copy a.php to my computer, then ftp it back, I get a full page of text and images as expected. Why ? How can I solve this ? Link to comment https://forums.phpfreaks.com/topic/45540-cant-use-include-in-a-created-php-file-why/ Share on other sites More sharing options...
jitesh Posted April 4, 2007 Share Posted April 4, 2007 Do copy("template.php","a.php"); Link to comment https://forums.phpfreaks.com/topic/45540-cant-use-include-in-a-created-php-file-why/#findComment-221076 Share on other sites More sharing options...
opels Posted April 4, 2007 Author Share Posted April 4, 2007 Sorry can't, preceeding template.php in the new .php file, a variable is set. The problem is why this won't display propertly until I do a copy/paste to my computer and back to the ftp? is it something to do with 'rights' or 'permissions' ? or something else. Link to comment https://forums.phpfreaks.com/topic/45540-cant-use-include-in-a-created-php-file-why/#findComment-221132 Share on other sites More sharing options...
monk.e.boy Posted April 4, 2007 Share Posted April 4, 2007 probably permissions. Run your code, then ftp to the site and check the permissions. Now download and upload the file and check what permissions have changed. monk.e.boy Link to comment https://forums.phpfreaks.com/topic/45540-cant-use-include-in-a-created-php-file-why/#findComment-221168 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.