php include path config.php

IOMISMO

New Member
Messages
6
Reaction score
0
Points
0
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.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
A simple example would be
PHP:
<?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?
 

IOMISMO

New Member
Messages
6
Reaction score
0
Points
0
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.
 

cachai6

New Member
Messages
12
Reaction score
0
Points
0
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/tutoriales/tutoriales_flex_avanzados/tutorial_1/

ENGLISH
-----------------------------------------------------------
[FONT=&quot]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[/FONT] :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:
Top