1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

stupid question

Discussion in 'PHP' started by seodesignnet, Aug 27, 2008.

  1. #1
    hi.
    I am very new at this.
    I made a script in php, named the file index.php. I am also using msql.
    I am trying to make a simple cms, so I made a table named PAGES like this:

    ID TITLE CONTENT
    EX. 1 test_example.php Blabla


    My problem is the following:
    I want to acces this page from my homepage, so that the url to look like:

    www.example.com/test_example.php

    I don't really undestand how to use the $_SERVER variable and other functions to create this page dinamically.
    THANK YOU!!!!
     
    seodesignnet, Aug 27, 2008 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    if your new in php best if you start at the beginning..

    if you want some answer to you question, you will be dealing with htaccess though... its url formating..
    or why dont you save your php files w/o spaces.

    heres some url
    http://www.w3schools.com
     
    bartolay13, Aug 27, 2008 IP
  3. UCDaZ

    UCDaZ Active Member

    Messages:
    180
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Also check if your docroot is pointing to the directory. Your docroot directory is where you should be keeping you php files.
     
    UCDaZ, Aug 27, 2008 IP
  4. nirajkum

    nirajkum Active Member

    Messages:
    815
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Your PHP file should be in the root directory .......
     
    nirajkum, Aug 27, 2008 IP
  5. seodesignnet

    seodesignnet Peon

    Messages:
    296
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    guys, I got it!
     
    seodesignnet, Sep 2, 2008 IP
  6. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    garrettheel, Sep 2, 2008 IP
    seodesignnet likes this.
  7. seodesignnet

    seodesignnet Peon

    Messages:
    296
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That is exactly what I did, thanks!
     
    seodesignnet, Sep 3, 2008 IP
  8. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No worries :)
     
    garrettheel, Sep 3, 2008 IP