hi Guys,
Just started looking into PHP as a way to better structure my sites using includes etc, so very much a newbie. I came across this thread as the topic similar to something I am looking to do. I have been working with the switch technique which works fine but one of the issues I had was using it with a larger nuber of pages. That is why Acecool's solution of using an array caught my attention.
I have tried to implement the code but get the following errors.
Warning: main(default): failed to open stream: No such file or directory in /hsphere/local/home/copious/pixelpyro.co.uk/structure/array.php on line 22
Warning: main(default): failed to open stream: No such file or directory in /hsphere/local/home/copious/pixelpyro.co.uk/structure/array.php on line 22
Warning: main(): Failed opening 'default' for inclusion (include_path='.:/hsphere/shared/apache/php/lib/php') in /hsphere/local/home/copious/pixelpyro.co.uk/structure/array.php on line 22
I have created the relevant files and the array.php is the main file with the page array code within it. Any ideas what I am doing wrong? Could it be how I am calling the page via a link (
http://www.pixelpyro.co.uk/structure...p?page=default)
I should mention that all of the files 123.php, 456.php and default.php are all there.
Thanks for any help..