bxN5
17.01.2009, 22:11
Происходит только при инклуде этого файла
Warning: include(/classes/db_con.php) [function.include]: failed to open stream: No such file or directory in /home/h1u54/public_html/t/include/config.php on line 2
Warning: include() [function.include]: Failed opening '/classes/db_con.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/h1u54/public_html/t/include/config.php on line 2 - это на хостинге
на денвере тоже самое почти
Warning: include(/classes/db_con.php) [function.include]: failed to open stream: No such file or directory in Z:\home\localhost\www\include\config.php on line 2
Warning: include() [function.include]: Failed opening '/classes/db_con.php' for inclusion (include_path='.;/usr/local/php5/PEAR') in Z:\home\localhost\www\include\config.php on line 2
Содержимое файла db_con.php
<?php
/**
* @author
* @copyright 2009
*/
class DB_Connect{
var $host = 'localhost';
var $user = 'root';
var $pass = '12345';
var $db = 'mycms';
function query_db($query)
{
$conn = mysql_connect($this->host, $this->user, $this->pass);
if (!$conn) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db);
$results = mysql_query($query, $conn);
mysql_close($conn);
return
$results;
}
}
?>
это из за класса... ооп я плохо шарю помагайте)
Warning: include(/classes/db_con.php) [function.include]: failed to open stream: No such file or directory in /home/h1u54/public_html/t/include/config.php on line 2
Warning: include() [function.include]: Failed opening '/classes/db_con.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/h1u54/public_html/t/include/config.php on line 2 - это на хостинге
на денвере тоже самое почти
Warning: include(/classes/db_con.php) [function.include]: failed to open stream: No such file or directory in Z:\home\localhost\www\include\config.php on line 2
Warning: include() [function.include]: Failed opening '/classes/db_con.php' for inclusion (include_path='.;/usr/local/php5/PEAR') in Z:\home\localhost\www\include\config.php on line 2
Содержимое файла db_con.php
<?php
/**
* @author
* @copyright 2009
*/
class DB_Connect{
var $host = 'localhost';
var $user = 'root';
var $pass = '12345';
var $db = 'mycms';
function query_db($query)
{
$conn = mysql_connect($this->host, $this->user, $this->pass);
if (!$conn) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db);
$results = mysql_query($query, $conn);
mysql_close($conn);
return
$results;
}
}
?>
это из за класса... ооп я плохо шарю помагайте)