PDA

View Full Version : Including php file in FORUMHOME not working


youssef87
05-27-2009, 02:34 AM
Hello,

I am trying to add a php file into FORUMHOME, and this is what I did.

I created a plugin with global_start and pasted the following code:


ob_start();
include('my/server/path/file.php');
$includedphp = ob_get_contents();
ob_end_clean();


I then pasted $includedphp in FORUMHOME and get these 2 errors:

Warning: include(my/server/path/file.php) [function.include.html]: failed to open stream: No such file or directory in [path]/global.php(405) : eval()'d code on line 2

Warning: include() [function.include.html]: Failed opening 'my/server/path/file.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(405) : eval()'d code on line 2


Any ideas?

Lynne
05-27-2009, 03:17 AM
You didn't literally put in 'my/server/path/file.php' did you? Make sure the file is in the location you put and that it is readable (that you don't get a no permission error).

youssef87
05-27-2009, 05:22 AM
You didn't literally put in 'my/server/path/file.php' did you? Make sure the file is in the location you put and that it is readable (that you don't get a no permission error).

No I put the actual path of my server and the file. The file is in a folder that is chmoded 777. Not sure why it is not working.

Lynne
05-27-2009, 02:38 PM
And the path is correct from the location of the file 'calling' it? And can you access the file via a browser?