[thelist] PHP require_once links not working?
Joe Flintham
list at menticulture.com
Fri Aug 18 10:18:00 CDT 2006
Pringle, Ron wrote:
>
>> Put this error reporting code at the top of your file:
>>
>> error_reporting(E_ALL);
>>
>> The other posts are most likely correct in that it's a path issue:
>> include, require, require_once etc. all are dependent on one
>> another in
>> some sort of way and everyone runs into this problem at some point in
>> time.
>>
>>
> I also tried adding the error reporting line and it still gives me a
> blank page with no errors reported. The PHP code at the top of the page
> now looks like:
>
> <?php
>
> error_reporting(E_ALL);
>
> require_once('validation/_includes/classes/validation/ValidationSet.php'
> );
>
> ?>
>
>
Hi Ron
Try using ini_set to switch on errors:
ini_set("display_errors", true);
in terms of the path, if this '_includes/classes/etc' works, but
'validation/_includes/classes/etc' doesn't, try:
require_once('../validation/includes/classes/etc/validation/VaidationSet.php');
Paul's suggestion of using the document root variable for all includes
is really handy too.
hth
joe
More information about the thelist
mailing list