[PHP] Re: include() and require() problem

2002-04-19 Thread Michael Virnstein

be sure that the path to the include file is relative to the script that was
requested
by the user. that's important if you include include-files into included
files.
you then have to make sure that the path to your include-file in the
include-file is
relative to the file that included the file, in which the include-file is
included.
*lol* what a sentence. anyway, hope you get my meaning!
another problem is using include /myincfiles/myfile.inc;
this way it could be searched in the root of the server, where for sure
your file can't be found. use relative path instead:
include ./myincfiles/myfile.inc;
./ means the same directory.
or use an absolute path, which has to contain the whole path from the
server's root, e.g.:
include /wwwroot/somedir/yourdocroot/myincfiles/myfile.inc;

Regards Michael

Rodrigo Peres [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 List,

 I'm trying to include some .inc files in my project, but I got errors
 all time saying that this includes couldn't be found. I'm a newbie, so I
 can't understand what's happend, since it worked pretty good in my local
 machine and not in the ISP. I tried to speak to ISP many times but they
 couldn't solve to.
 My directorie structure is : HRM(directorie)-includes(directorie)-my
 inc files(to be included in files that is in the directorie HRM).

 Thank's

 Rodrigo




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: include() and require() problem

2002-04-19 Thread Vins

I'm also having a problem with including file into and include file.
my script reads.

( (strpos($PHP_SELF,admin/)) ? include('../includes/mysql.inc.php') :
include('includes/mysql.inc.php') );
mysql_pconnect($mysqlDBhost,$mysqlDBuser,$mysqlDBpass)
 or die (Database access error. Please contact the site webmaster at
$webmasterEmail.);
mysql_select_db($mysqlDBdatabase)
 or die (Couldn't Select Database. Please contact the site webmaster at
$webmasterEmail.);

my server is running php4.1.2 and there is not problem
i am also running php4.1.2 but reads back a problem.
this one

Warning: Failed opening 'includes/mysql.inc.php' for inclusion
(include_path='c:\php4\pear') in
D:\Apache\htdocs\auction4sale\includes\config.inc.php on line 47
Database access error. Please contact the site webmaster at .

any suggestions ?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php