-
PHP include
Im trying to include a DJ Says to my site. But i keep getting this error
Code:
arning: include(../config.php) [function.include]: failed to open stream: No such file or directory in /home/********/public_html/******/panel/*****/djsays.php on line 20
Warning: include(../config.php) [function.include]: failed to open stream: No such file or directory in /home/********/public_html/******/panel/*****/djsays.php on line 20
Warning: include() [function.include]: Failed opening '../config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/******/panel/*****/djsays.php on line 20
Warning: mysql_query() [function.mysql-query]: Access denied for user 'highhero'@'localhost' (using password: NO) in /home/********/public_html/******/panel/*****/djsays.php on line 21
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/********/public_html/******/panel/*****/djsays.php on line 21
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/********/public_html/******/panel/*****/djsays.php on line 22
The code im using is simply
Code:
<?php
include("../panel/public/djsays.php");
?>
-
Does the DJ Says script work on it's own? Some of those errors being thrown up look related to the djsays.php file rather than the include or anything.
-
Its apart of a panel which was made by a friend. There's a public folder in which is meant to be accessable
-
Mind sharing djsays.php or at least lines 20 and 21? I think that's the source of the problem here.
-
Elliot, you dont know what your talking about...
Its obviously can not find the file on the given path.
With PHP include, you need to give the exact path to the file. So for example, if you were including "config.php" in an "includes/" folder and a file you were including in the "includes/" folder was also in that folder, & u were included the config.php file in a parent directory, you would have to link to the file like: "/includes/otherfile.php"
Lew.