Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2003
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    New Coder
    Join Date
    Oct 2003
    Location
    AZ
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    he... i just fookin' asked that.
    PHP | FreeBSD | MySQL |
    Check documentation... check documentation again and actually read it..do it... doesn't work ask.

  • #3
    New Coder
    Join Date
    Oct 2003
    Location
    AZ
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Plenty of tutorials for mod_rewrite too, which is more effective I think

  • #5
    New Coder
    Join Date
    Oct 2003
    Location
    AZ
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    New Coder
    Join Date
    Oct 2003
    Location
    AZ
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP | FreeBSD | MySQL |
    Check documentation... check documentation again and actually read it..do it... doesn't work ask.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •