SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jun 2002
    Location
    ***
    Posts
    372
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    placing php script in folder not root directory

    I have a php script that can not go in the root of my domain on the server. The script's admin is

    www.domainname.com/admin

    And I am on an ensim panel and the admin for ensim is
    exactly the same

    So if put the script in a folder, how do I call it up when someone goes to the website. I will have no index file in the root directory. What do I put in there to execute the script and/or view the website.

    thank you

  2. #2
    SitePoint Evangelist netkid's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    563
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...I guess you could include the file?

    Soo... that would look like: index.php

    PHP Code:

    include ("[B]FILENAME[/B].php");

    <
    Your own stuff here if you have any

    Santosh Sankar
    Bullish Bankers

  3. #3
    SitePoint Addict
    Join Date
    Jun 2002
    Location
    ***
    Posts
    372
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must be doing something wrong......I placed that code on a new page and saved it as index.php.

    But it doesn't do anything. It just shows a page with the words on it.

  4. #4
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you have to replace FILENAME with the one you need.

  5. #5
    SitePoint Addict
    Join Date
    Jun 2002
    Location
    ***
    Posts
    372
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I replaced it with index.php because that file was in the script so I assumed it was the one to use.

    Boy oh boy......I know this is easy.........I've probably done something real silly.

  6. #6
    SitePoint Evangelist netkid's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    563
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    specify the path:

    PHP Code:

    include("/your/place/YOURFILE.php"); 

    Santosh Sankar
    Bullish Bankers


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
  •