Welcome to WebmasterWorld Guest from 50.16.79.246

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)

Preferred Member

10+ Year Member

joined:Apr 25, 2006
posts:409
votes: 0


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

---------------------------
<?php
$content = array("http://file3.php", "http://file2.php", "http://file1.php");
shuffle($content);
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 June 14, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 25, 2006
posts:409
votes: 0


Figured out the problem. Thanks!
1:53 pm on June 15, 2008 (gmt 0)

Senior Member

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

joined:Nov 12, 2005
posts:5966
votes: 0


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.