I want to display some stand alone web pages from my server in a single web page when requested by the user. The pages are listed by topic.
I thought it would be simple to use the include_once function and then use ($url) for the path to the file, but it seems that this will not work. I can echo $url and it shows the correct path, but has no effect when trying to load the page. I am sure that I have missed something here, any help would be appreciated.

8 Years
Discussion Span
Last Post by rajarajan2017

HI Raja,
thanks for your help with this. Unfortunately your suggestion did not work. I have tried the following:

$url = $_GET;
echo $url;
$urle = ('../2010/01/January_10.html');
require $urle;
The echo displays the correct path to the page I want to include.
When I use the $urle and require it the correct page is displayed. But, when I use require $url, even though it echos correctly, nothing happens.
Any further help would be great!

$url= (isset($_GET['name']) && !empty($_GET['name'])) ? $_GET['name'] : NULL;

Edited by rajarajan2017: n/a


whats the value of $_GET? ist the name of a person?, like "John"?, why are including names?, include and require function are used for including files, of course the $urle works coz its a path to the filename which is the january_10.html. what are you tring to do?

Edited by vaultdweller123: n/a


Hi guys,
thanks for your input, I have now solved the problem, it was three dots instead of two in my path...grrr!
It just needed another pair of eyes that hadn't been looking at the same code for as long as I have.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.