connect with include
Posted: Sat Feb 07, 2004 6:18 pm
Hi,
Sorry to molest for such a small "beginner" issue. In order to connect I use the following script in access.php (<?php include('../access.php'); ?>
<?php
if (!$db = mysql_connect('localhost', 'user', 'pass')) {
die('mySQL error: '.mysql_errno().':'.mysql_error());
}
if (!mysql_select_db('pass')) {
die('mySQL error: '.mysql_errno().':'.mysql_error());
}
?>
error is the following:
Warning: Failed opening '../acceso.php' for inclusion (include_path='./:/usr/local/lib/php') in /home2/user/site-www/page.php on line 1
What did I wrong (the connection works) or better what do I have to do to correct this.
Thanks a lot for any help
Flavio
Sorry to molest for such a small "beginner" issue. In order to connect I use the following script in access.php (<?php include('../access.php'); ?>
<?php
if (!$db = mysql_connect('localhost', 'user', 'pass')) {
die('mySQL error: '.mysql_errno().':'.mysql_error());
}
if (!mysql_select_db('pass')) {
die('mySQL error: '.mysql_errno().':'.mysql_error());
}
?>
error is the following:
Warning: Failed opening '../acceso.php' for inclusion (include_path='./:/usr/local/lib/php') in /home2/user/site-www/page.php on line 1
What did I wrong (the connection works) or better what do I have to do to correct this.
Thanks a lot for any help
Flavio