Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 03:38 AM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Canada
Posts: 268
ackerley1 RepRank 0
Default Page Detections

Is there a way to detect what page is loading using php?

For example I want to create a function that will load various bits of info based on the page.

If {Index.php -> Display 1}

if {product.php -> Display 2 }

if {product-7 - Dislpay 3 }

Is there a way that I can use a $_HTTP Something to determine the page that is loading?

Any help would be appreciated.

Thanks
__________________
Rob
Reply With Quote
  #2 (permalink)  
Old 06-13-2007, 03:51 AM
sands's Avatar
WebProWorld Veteran
 

Join Date: Sep 2005
Location: Kerala, India
Posts: 397
sands RepRank 1
Default Re: Page Detections

This code should do:
Code:
if($_SERVER['PHP_SELF'] == "/index.php") { ............; }
if($_SERVER['PHP_SELF'] == "/product.php") { ............; }
__________________
My Nook | My Biz | My Photos
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Moved in PHPBB forum: duplicate page issue smo Google Discussion Forum 4 06-13-2007 01:00 PM
Home page Dynamic Vs Html static page Steven1976a Search Engine Optimization Forum 4 05-27-2007 07:10 PM
Home Page Link On Page Rank 6 Real Estate Forum kelouba Ad Space Buy and Sell 1 11-23-2006 01:34 PM
Page rank on all pages bar the main page......help!! Hutchie Google Discussion Forum 0 11-16-2005 07:11 PM
G's cache of my page doesn't show entire page??? theiceman Google Discussion Forum 1 11-21-2004 10:40 PM


Search Engine Optimization by vBSEO 3.2.0