Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Included files don't parse their PHP



5:01 am on Jun 14, 2008 (gmt 0)

5+ Year Member

Okay - so I'm using the following code to rotate a certain PHP file on my home page.

$content = array("http://file3.php", "http://file2.php", "http://file1.php");
echo file_get_contents($content[0]);

Why is it that the PHP scripting on the included files DOES NOT get parsed? When I view the main page of my site - the source code - I see the PHP that SHOULD HAVE been parsed - but is just plain, raw php. I need a bit of help with this. Am I calling the .php files incorrectly - thus allowing them not to be parsed before being included? Thanks!


9:29 am on Jun 14, 2008 (gmt 0)

5+ Year Member

Figured out the problem. Thanks!


1:53 pm on Jun 15, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Glad you resolved your issue. I'm sure you found that you should be using the full URL, ie. http://www.example.com/script.php for the include.

Featured Threads

Hot Threads This Week

Hot Threads This Month