|
Posted by J.O. Aho on 07/28/06 18:15
PSI_Orion wrote:
> I presume you can have the file anywhere as long as you reference the file
> by the full path.
Yes, thats true.
include_once('/path/to/file/myinclude.php');
> in other words, I can keep it in the root path rather than
> in the includes path?
Yes, but it can be good to have a include directory, but keep in mind that
when you use relative paths instead of absolute paths, the path is always
counted from the main file
say the URL is: http://www.example.com/index.php
you have include files in a directory called includes
in the index.php you have
include_once('includes/mysql.php');
and you in mysql.php include another file, you still need to give the path as
if the include was done in the index.php, as with other words
includes/anotherinclude.php and not just anotherinclude.php.
> I do a result check (with the code you supplied) and
> I do get a result of 1 for the include, it's just that it can't see the
> function when it calls it for some unknown reason.
Do you have error messages suppressed?
Set in your php.ini
error_reporting = E_ALL & E_NOTICE & E_STRICT
display_errors = On
And avoid to use to many @, this way you will see what errors you get at once
instead of using a logfile.
As long as you don't use remote includes (not always enabled and don't work in
PHP for microsoft before 4.3.0).
//Aho
Navigation:
[Reply to this message]
|