I am using php include. For my a href I am using this:
<a href="main.php?id=buttons/linkus">Buttons</a>
main.php is the page where all the content goes to. Click the link and it goes to the table where I have this:
This is what the server reads when it first loads the site:
[php]<?php if($id !=""){ readfile("$id.html");} else{ readfile("http://www.XXXXXXXXXXX.com/php-bin/news/news.php");} ?>[/php]
That will load the news page right off the bat. Now that first part of it says read _______.html
That tells the server that when a link is clicked it should read that content from the page.
Example:
www.XXXXXXXXX.com/main.php?id=buttons/linkus
When that link is clicked it says hey go here:
www.XXXXXXXXX.com/buttons/linkus.html
Read that content. Then this takes over:
[php]<?php include("./$id.html");?>[/php]
That says hey include that file in here.
But it isn’t doing that. It will load the “else readfile” but not the content I point the link to. It does this:
Warning: include(./.html) [function.include]: failed to open stream: No such file or directory in /home/XXXXXXXX/public_html/main.php on line 246
Warning: include(./.html) [function.include]: failed to open stream: No such file or directory in /home/XXXXXXXX/public_html/main.php on line 246
Warning: include() [function.include]: Failed opening ‘./.html’ for inclusion (include_path=’.:/usr/lib/php:/usr/local… in /home/XXXXXXXXXX/public_html/main.php on line 246