+ Reply to Thread
Results 1 to 4 of 4

Thread: php include path config.php

  1. #1
    IOMISMO is offline x10Hosting Member IOMISMO is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    6

    Exclamation php include path config.php

    Hi everybody. I've been searching through forums and i didint find what im aiming to. I wanna include some php files from outside the public html folder, this is one of the solutions ive found:

    $phpbb_root_path= $_SERVER['DOCUMENT_ROOT']."/";
    include($phpbb_root_path . 'common.' . $phpEx);

    The problem is that i dont know if it is working cause im using AMFPHP to use with flash and i think it even dont reach to call the "connect to database" cause im not retrieving any mysql error. PHP its activated.

    Im a bit noobie, the question is if as when u program in your localhost with xaamp, for example, u can include files from your include path, that by default i think its set to c:\xaamp\php\PEAR\ or any other/s folder/s outside the httdocs(public) directory, with any problem. Im asking this to know if my config.php(or the file that contains database variables,user,pass..),have to be of public domain.

    The conclussion is that i want to include files from outside the public folder, and if anybody knows how to config amfphp.

  2. #2
    TechAsh's Avatar
    TechAsh is offline Retired TechAsh is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    5,853

    Re: php include path config.php

    A simple example would be
    PHP Code:
    <?php
    include("/home/username/file/outside/of/public/domain.php");
    ?>
    The "/" tells PHP to start from the root directory, instead of the current directory.

    Is that what you wanted to know?
    Useful Links:
    Terms of Service | Server News | Buy a Domain
    Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime


    My Websites:
    Earthtime Games & TechAsh's Blog

  3. #3
    IOMISMO is offline x10Hosting Member IOMISMO is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    6

    Re: php include path config.php

    yeah,thx for the fast reply. Ive tried another php files that dont use amfphp and it works. I think i have to continue searching to find how to get AMFPHP working.

  4. #4
    cachai6 is offline x10Hosting Member cachai6 is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    Venezuela - Caracas
    Posts
    12

    Talking Re: php include path config.php

    Quote Originally Posted by IOMISMO View Post
    yeah,thx for the fast reply. Ive tried another php files that dont use amfphp and it works. I think i have to continue searching to find how to get AMFPHP working.
    My page: http://developyourdream.exofire.net
    My page using AMFPHP: http://developyourdream.exofire.net/...os/tutorial_1/

    ENGLISH
    -----------------------------------------------------------
    Hi, I had the problem that my AMFPHP didn’t WORK TO.

    But I fix it when I saw the .htaccess in the AMFPHP FOLDER so I uploaded into their server and I deleted the .htaccess.

    I think that may have some security issues but it Works
    :hahano:

    SPANISH
    ----------------------------------------------------------
    Hola, yo también tuve ese problemas en el cual AMFPHP no funcionaba
    Pero me di cuenta que .htaccess estaba en la carpeta de AMFPHP por lo tanto lo que hice fue subirlo al servidor y borre el archivo .htaccess
    Imagino que eso traerá algunos problemas de seguridad pero funciona :hahano:
    Last edited by cachai6; 11-09-2008 at 01:21 AM.

+ Reply to Thread

Similar Threads

  1. Replies: 3
    Last Post: 03-10-2008, 12:22 PM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers