homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

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)

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)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved