FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


my site is showing error,have checked ma codes and didnt fin





jossylala
this the error i get:Warning: include(/includes/
config.inc.php)
[ function.include]: failed to
open stream: No such file or
directory in /home2/
infotec7/public_html/
noticeone/index.php on line
1
Warning: include()
[function.include]: Failed
opening '/includes/
config.inc.php' for inclusion
(include_path='.:/usr/lib64/
php') in /home2/infotec7/
public_html/noticeone/
index.php on line 1
Fatal error: Call to
undefined function
selectFrom() in /home2/
infotec7/public_html/
noticeone/index.php on line
3
jossylala
please tell me what i did wrong. thanks <? include($HTTP_SERVER_VARS["DOCUMENT_ROOT"] ."/includes/config.inc.php");

$page_data = selectFrom("SELECT description FROM ".TBL_CONTENT." WHERE id = 10");

?>
jmraker
It means it failed to find the "config.inc.php" file in the includes directory.

You don't really need to specify the full path to an file that is in a subdirectory of the current page, a simple include('includes/config.inc.php') will include the file. If the includes directory is in a parent of the current directory just use include('../includes/config.inc.php')

You might want to change $_HTTP_SERVER_VARS['DOCUMENT_ROOT'] with $_SERVER['DOCUMENT_ROOT']

If you still have problems you can add a var_dump($_SERVER['DOCUMENT_ROOT']) to double check it's set to the directory with the "includes", or doing a var_dump(getcwd());

If it still can't find the includes directory you can try system('ls -l') or var_dump(glob('*')); to see the files/directories in the current directory
imagefree
ok try to find the exact location of config.inc.php in the directory structure, match the exact location of the directory with the one that is given in the error. and then you would be able to figure out what and where the problem is. if you cant, share the exactlocation here.
jossylala
Thanks guys. i have sortd out the problem. i did change it to $_SERVER . I WORKED
Related topics
[java scripts] Text effect , img ....
Codes
my index wont display
Not just an art site!
www.poxyproxy.com is BACK!!!- Access blocked sites@school
Error eh?
Site Showing Error.
Need help with site getting error on http://validator.w3.org
New site.
First 10 to win get 10
25$ for just a little tip. for Beginners' website
XML sitemap for secure sites...
New Site for Source codes
Error 110: Request Timed out
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.