0

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.

3
Contributors
8
Replies
10
Views
7 Years
Discussion Span
Last Post by rajarajan2017
0

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!

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

Edited by rajarajan07: n/a

0

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

0

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.