Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to include files based on urls

Seeking help on How to include files based on urls

3:39 pm on Oct 1, 2009 (gmt 0)

New User

5+ Year Member

joined:Oct 1, 2009
posts: 1
votes: 0

I have an article site with urls in 4 different groups like:





I'd like to add category specific content to the categories, distinct common elements to all article pages and similarly to page and pages group of pages.

I am a beginner but can manage to do simple php tasks.

Can someone help me with how to go about this?

5:14 am on Oct 2, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 9, 2005
votes: 0

Hi shiv22,

Welcome to WebmasterWorld!

Quite a bit of what you're asking about depends on how your system is set up to do things... You'll probably find more help if you try some code of your own and post an example of it, because some of the people who post here code professionally and would rather 'educate' here than 'work for'.

I'm actually not sure what the answer is, because I don't know how your system works and what you've tried, but I can tell you $_SERVER['REQUEST_URI'], $_SERVER['QUERY_STRING'] and either strstr(), strpos() or preg_match() are probably going to be important...

Take a shot at what you think should work, then if it doesn't, post the relevant code, what doesn't work correctly as well as why it doesn't work and someone will probably help you work through it or at least point you in a direction.