Dynamic including problem

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
Aleks
Forum Newbie
Posts: 2
Joined: Mon Feb 16, 2009 12:08 am

Dynamic including problem

Post by Aleks »

Hello Guys! Ive been looking for an idea about "how to create a dynamic including (by folder?) on php" but i just cant find the answers. I tried searching using the different search engines but still i cant get what i find.

here is what i mean about dynamic including?

index.php?pagename=folder&page=pagename


Hoping for your help,

Aleks

P.S. I am actually new on php.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Dynamic including problem

Post by s.dot »

Code: Select all

require $_GET['pagename'] . DIRECTORY_SEPARATOR . $_GET['page'];
But definitely check if it exists first, check if it's allowed, and cleanse the input.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Aleks
Forum Newbie
Posts: 2
Joined: Mon Feb 16, 2009 12:08 am

Re: Dynamic including problem

Post by Aleks »

<a href="index.php?pagename=folder&page=pagename">Link Name</a> this actually the link look like.
Post Reply