Submit Your Article Forum Rules Search
WebProWorld
Register FAQ Calendar 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.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 03:38 AM
WebProWorld Pro
 
Join Date: Jul 2003
Location: Canada
Posts: 275
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: 395
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

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

BB 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
Home Page Link On Page Rank 6 Real Estate Forum kelouba Ad Space Buy and Sell 3 09-03-2009 10:07 AM
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
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


All times are GMT -4. The time now is 03:00 PM.



Search Engine Optimization by vBSEO 3.3.0