Jump to content

[SOLVED] second require_once(); does not work


Recommended Posts

this code produces this error

 

<?php
/*******************uncomment to add**************/

        require($_SERVER['document_root'].'/lib/lib.inc');
        require($_SERVER['document_root'].'/lib/bannergen.inc');

/************************************************/

echo <<<HTML

        <html>
        <head>
        <title>Banner Demo</title>
        <link rel='stylesheet' type='text/css' href='style.css'>
        </head>
        <body id='body'>
HTML;

        getpics();

echo <<<HTML

        </body>
        </html>
HTML;
?>

 

Warning: require_once(/lib/bannergen.inc) [function.require-once]: failed to open stream: No such file or directory in /var/www/offline/banners/index.php on line 4

Fatal error: require_once() [function.require]: Failed opening required '/lib/bannergen.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/offline/banners/index.php on line 4

 

and i cant figure out why it errors on the second but not the first, the name of both files are correct. and i can acess both of them

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.