Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-26-2004, 04:32 PM   PM User | #1
loonatik
New Coder

 
Join Date: Mar 2003
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
loonatik is an unknown quantity at this point
how does "page.php/11/" work?

I came upon this page php website and this url:
http://www.outwardsound.com/bundles.php/
is sort of like a template. And if you add a number to the end like:
http://www.outwardsound.com/bundles.php/14/
you'll see valid product info.

I would've guessed to make a page, say bundles.php and to display valid info, it would be bundles.php?id=14
So how does this "bundles.php/14/" work? with the slashes (and without a variable like "?id="). Thanks.
loonatik is offline   Reply With Quote
Old 01-26-2004, 04:36 PM   PM User | #2
coffeedemon
New Coder

 
Join Date: Oct 2003
Location: AZ
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
coffeedemon is an unknown quantity at this point
he... i just fookin' asked that.
__________________
PHP | FreeBSD | MySQL |
Check documentation... check documentation again and actually read it..do it... doesn't work ask.
coffeedemon is offline   Reply With Quote
Old 01-26-2004, 04:50 PM   PM User | #3
coffeedemon
New Coder

 
Join Date: Oct 2003
Location: AZ
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
coffeedemon is an unknown quantity at this point
i figured it out.

PHP Code:
<?php
function strip_ID($str)
{
$str str_replace("/"""$str);
return 
$str;
}

echo 
strip_ID($_SERVER["PATH_INFO"]); # a url [url]HTTP://domain/dir/dir/filename/666/[/url] returns /666/ so you have to strip the / out and replace it with nothing
?>
you can see the result at http://devleworm.com/window/phpinfo/64654654645654/
__________________
PHP | FreeBSD | MySQL |
Check documentation... check documentation again and actually read it..do it... doesn't work ask.
coffeedemon is offline   Reply With Quote
Old 01-26-2004, 05:05 PM   PM User | #4
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
Plenty of tutorials for mod_rewrite too, which is more effective I think
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 01-26-2004, 05:07 PM   PM User | #5
coffeedemon
New Coder

 
Join Date: Oct 2003
Location: AZ
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
coffeedemon is an unknown quantity at this point
ah ha. yes it is. i figured it was something with the apache server. thanks a lot!
__________________
PHP | FreeBSD | MySQL |
Check documentation... check documentation again and actually read it..do it... doesn't work ask.
coffeedemon is offline   Reply With Quote
Old 01-26-2004, 05:16 PM   PM User | #6
coffeedemon
New Coder

 
Join Date: Oct 2003
Location: AZ
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
coffeedemon is an unknown quantity at this point
reference: http://www.sitepoint.com/article/910
__________________
PHP | FreeBSD | MySQL |
Check documentation... check documentation again and actually read it..do it... doesn't work ask.
coffeedemon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:58 AM.


Advertisement
Log in to turn off these ads.