Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
need help with REQUEST_URI !
Old 09-21-2007, 04:02 PM need help with REQUEST_URI !
Average Talker

Posts: 20
Trades: 0
Hello,

How can i stop getting the URL with REQUEST_URI when it encounters a slash? e.g. www.domain.com/getthis/dontgetthis

I can't seem to find a way to make REQUEST_URI stop, it just gets everything after a '/'...

My current code:

Code:
$str = explode('/', $_SERVER['REQUEST_URI']);
Can anybody help?
koolaid is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-21-2007, 04:13 PM Re: need help with REQUEST_URI !
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Try:

PHP Code:
$str explode('/'$_SERVER['PHP_SELF']);
$str $str[0]; 
What it happening is it's showing the URL of the script including all the folders, you gotta explode off the slashes.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE

Last edited by rogem002; 09-21-2007 at 04:19 PM..
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to need help with REQUEST_URI !
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17251 seconds with 12 queries