http://www.php.net/manual/en/ini.cor...i.include-path
Printable View
Sorry. Im really not very good at php yet. Im new.
So what do I put in my php.ini file if my includes path is http://www.finalfantasyfan.net/includes/
It's a local path, not an URL.
Do I have to include php.ini?
i didn't include it but had this and it didn't work. When i went into a sub folder the includes were messed up.Code:<?php
// Works as of PHP 4.3.0
set_include_path('/home/noth/public_html/includes');
// Works in all PHP versions
ini_set('include_path', '/home/noth/public_html/includes');
?>
I'm not surprised.
Try:Code:$seperator = ":"; // ; for Windows, : for anything else
set_include_path(get_include_path() . $seperator . '/home/noth/public_html/includes');
I put that in my php.ini file and then went on to my index.php in the folder 't' and it wouldn't work:
Twey. Have you got AOL or MSN?Code:Warning: main(includes/maincore.php): failed to open stream: No such file or directory in /home/noth/public_html/t/index.php on line 11
Fatal error: main(): Failed opening required 'includes/maincore.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home') in /home/noth/public_html/t/index.php on line 11
By the way mate, you've been a great help, thank you a lot :)
Happily, no.Quote:
Twey. Have you got AOL or MSN?
Firstly, that wasn't meant to be in your php.ini file, it's PHP code. If you want to use php.ini, find the line beginning "include_path" and add :/home/noth/public_html/includes to the end of the value.
Secondly, there'll be no need to specify the directory; it would simply be require_once('maincore.php').
Ok thannk you - it worked. Wouldn't work in php.ini so I put that code at the top.