开发者

file is not being accessed in php script in yahoo small business domain

hi every one i'am having problem with include/require_once in PHP by which iam accessing a configuration file to connect database.

This problem exists in yahoo small business servers where i hosted my site in a free host it works fine for the same code.

the database connection is working fine but the including of files are not working even not showing an error.

Please help me out to solve this issue.

If this question is to placed on other location please lead me there.

Thanks.

<?php 
    session_start();
    require_once("classes/DbConfig.php");
    $object_db = new DB();
    $object_db->open_connection();
?>

The above is the code for accessing the DbConfig.php file which is in classes folder and the below is for creating instance of class and opening the connection which is a function in that class.

here i used include also but there is no display of any error.

i checked that if that file exists or not using the following code.

<?php
    if(file_exists("classes/DbConfig.php")) echo "File Found"; else echo "File Not Found";
?>

it displays "File Found".

And there are开发者_运维知识库 no error logs in the domain control panel


The file may exist however your website user (apache?) may not have the rights to read it. I would modify the script #1 to actually output something after require_once() - if it doesn't output anything you'll know that nothing gets included actually.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜