Hi guys. I am having an odd problem right now. I am not able to access pages from my website. Here is the URL to the site:
http://www.dhonixpress.com
Try accessing the page http://www.dhonixpress.com/index.php?videos
Instead of the videos page opening, you are presented with the homepage itself. I think the admin of the server has disabled global variables. I have been using global variables from a very long time and I dont know how to use those super globals. Here is the code which handles my pages. Can someone make the neccesary changes?
http://www.dhonixpress.com
Try accessing the page http://www.dhonixpress.com/index.php?videos
Instead of the videos page opening, you are presented with the homepage itself. I think the admin of the server has disabled global variables. I have been using global variables from a very long time and I dont know how to use those super globals. Here is the code which handles my pages. Can someone make the neccesary changes?
| Code: |
|
<?php include("page_begin"); // Include html code which is common to all the pages if(empty($argv)) { // If no page arguments are supplied, include the default, i.e. the home page include("pages/home"); } elseif(!empty($argv)) // otherwise do a check on the page requested, if its valid, include it { $argv[0] = strtolower($argv[0]); $pages = array('home', 'biography', 'about', 'statistics', 'news', 'videos'); // Used for file security check if( in_array($argv[0], $pages) && file_exists("pages/$argv[0]") ) { // Finally the file security check include("pages/$argv[0]"); } // If the argument passed is invalid/non-existant, print the following message else { echo "Invalid page request!"; } } include("page_end"); // Html code common to all pages ?> |
