scripting - How do I load content from a PHP file (and executing the script) from another PHP file? -


I have PHP scripts (index.php) that changes the page shown based on the query portion of the URL (GET use) ). All the links in the page ? Using different "pages" using Page = pageName , and the index.php script loads the HTML according to the text files (resonates on the screen).

Therefore, if a user is index.php? Page = about , then my PHP script loads the file named about.php and resonates it in a view container in the browser

However, I have a big problem : The content I am loading is PHP scripts, but those scripts are not executed when using index. Php scripting makes it impossible for me to load a page that says, a directory list extracted from a MySQL database.

So basically, I want to know that there is any way that I have a PHP file

for clarity, I've attached an annotated screenshot which means what I mean Is:

Edit: Here's the link:

 Enter the image details here

To join index.php if the statement ('About.php'), and insert echo statements within about.php. If this does not work, please post the code example.

  if ($ _REQUEST ['someQuery'] == 'about') {include ('about.php'); }    

Comments