SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    world
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up how to write it ?

    Hi,
    I do not know whether it is php topic or not . But I saw some website
    like www.site.com/test.html?val=g3
    or
    www.site.com/?val=g3

    I know how ...GET... in php works www.site.com/test.php?val=g3

    but how those two script work ?
    url]www.site.com/test.html?val=g3[/url]
    or
    www.site.com/?val=g3

    can any one give me a example. Please help.

    ----thanks.

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In case of .html, if this extension is registered on the web server to be parsed by php, it will work as any php script.

    In case of no file specified, web server looks for the default file in document root as specified in its configuration (ex. index.php); thus it is the same as example.com/index.php?var=123
    Saul

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2006
    Location
    Chicago
    Posts
    542
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the Apache server, replacing file extensions can be done with an .htaccess file and the mod_rewrite module. There, you can make any extension point to the corresponding php file.

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    world
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot for the hint


Bookmarks

Posting Permissions

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