Godard Posted May 23, 2006 Share Posted May 23, 2006 php code is not executed when the file is created with a script on the server, but runs if the same file is uploaded.I create a file xxx.php wich contains php code on the server. When I try to execute the created file it shows only the html code and cannot cope withe the line <?php 'include('filename.php') ?> It simply cannot find the file 'filename.php'. When I download ths file xxx.php and upload it to the server: it runs normally and it can find the included file. Anyone famliar whith this phenomena?Godard Link to comment https://forums.phpfreaks.com/topic/10262-php-code-not-executed/ Share on other sites More sharing options...
zq29 Posted May 23, 2006 Share Posted May 23, 2006 Maybe you could post up some code? I run a test with the following code and everything appears to work fine, is this how you're doing it?[code]<?php$h = fopen("new.php","wb")fwrite($h,"<?php\r\n phpinfo()\r\n ?>")fclose($h)include "new.php"?>[/code]Please Note: I have not included the semi-colons on the end of the the functions, there is a forum bug that prevents this. Link to comment https://forums.phpfreaks.com/topic/10262-php-code-not-executed/#findComment-38240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.