Micro Niche Builder
+ Reply to Thread
Results 1 to 3 of 3

Thread: How to get a PHP file to be included across files in different directories?

  1. #1

    Default How to get a PHP file to be included across files in different directories?

    Currently I have created some php based webpages and uploaded them to my web hosting server.It has a PHP 5.1.6
    installed.With this I am able to include files only that are in the same directory(they work well using require() fn).If not an error message displaying some "no such file" in directory appears in the page.I would like to use them to be included in different direcetories.What should I do?


  2. #2

    Default

    PHP Code:
     include "../page.php"
    should get that page from the directory above. which means you can then do things like
    PHP Code:
     include "../some_folder/page.php"
    enjoy

  3. #3

    Default

    Code:
    <?php include 'some/other/directory/file.php'?>
    Try this and reply.

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 03-17-2011, 08:23 PM
  2. Manual Directories Submission Service upto 1500 Directories
    By megrisoft in forum Webmaster Classifieds
    Replies: 0
    Last Post: 08-17-2007, 07:43 AM
  3. File.sc - Free File Hosting - 2GB Per file - Multiple Servers running
    By imported_Raider in forum Webmaster Classifieds
    Replies: 3
    Last Post: 01-08-2007, 11:31 AM
  4. Replies: 1
    Last Post: 09-25-2006, 08:53 AM
  5. Replies: 0
    Last Post: 08-02-2006, 03:53 AM

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