whats going on is everything is loading just fine url is deigned.sytes.net except for the links when i click about us or services or contact they look like there loading but the content in body.tpl doesn’t change from default. maybe you can help me with this why the links are not changing. you u want here are the ONLY php files
I have made phps files for view perpose’s but if you insist on it i will post the require code.
designed.sytes.net/index.phps
designed.sytes.net/classes/file.class.phps
In the URLs you name the parameter
pbut in yourfiles.class.phpyou actually test for$_GET['page']. So either change the URLs to usepageas parameter or change the code to:In your original code, as
$_GET['page']does never exist, it always shows the index page.Another thing that looks strange to me is the following (but maybe it is just how you set it up):
You first check whether the text file e.g.
about.txtexists but then include a PHP filecontents/about.php. Is this intended? Does the PHP always exist if the text file exists?UPDATE:
Also make sure that you properly check the value that you get from
$_GET['page']or however you call it in the end.E.g. this call
http://designed.sytes.net/index.php?page=../indexseems to kill your server (sorry it was unintentionally 🙁 )UPDATE 2:
In order to provide “some” security you could check whether
$_GET['page']is one of predefined values instead of checking whether a file with this name exists. E.g:That makes sure that
$_GET['page']is not of form of relative pathes like../index. If it is not one of those values in$valid_pagesyou redirect to the home page.