|
Posted by PSI_Orion on 07/28/06 23:24
Well! That's damn strange! I have just checked my php.ini and noticed 2
things.
If I change the error_reporting to "error_reporting = E_ALL & E_NOTICE &
E_STRICT" I get absolutely NOTHING printed on the screen. No errors,
warnings or anything so I have switched back to what I had initially which
was " error_reporting = E_ALL"
Also, I noticed that the "include_path" directive was commented out and
phpinfo was reporting it as "c:\php5\perl\" so I changed it to
c:\php\includes and still got the error. Then I copied the includes from
where I would LIKE to have stored them to the c:\php\includes folder and now
it works! But, according to all the documentation I have read, I should be
able to include a file from anywhere.
Oh well, it's working now so....
"J.O. Aho" <user@example.net> wrote in message
news:4iv2ihF5lrsdU1@individual.net...
> 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]
|