I am new to PHP, and am trying to use a script that I've found on the net.. Bascially all I have to do it upload a directory and then use a php include to execute the .php file in the directory. My problem is that every time I run this I get the following error:
Warning: main(http://www.agmillerstudios.com/digitalp ... menter.php): failed to open stream: No such file or directory in /home/agmiller/public_html/digitalprintreview/review_list.php on line 78
Warning: main(): Failed opening 'www.agmillerstudios.com/digitalprintrev ... menter.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/agmiller/public_html/digitalprintreview/review_list.php on line 78
The rest of my page loads correctly, but wherever this program is suppossed to be included at the text shows that error.. Am I doing something wrong?
The program is suppossed to allow people to make comments on articles that I will be posting on my sight.
Thanks for any and all help!
Edwards
HELP WITH INCLUDES
Moderator: General Moderators
Replace your original include() function call with the following.
Code: Select all
<?php
$file = realpath('commenter.php');
if(file_exists($file)) {
include_once($file) or die('cannot include ' . $file);
} else {
echo $file . ' does not exist';
}
?>I'll tell you what, there are some very intelligent programmers on forums like this =) Thanks a ton for the help thus far, but unfortunatly I need to ask another question now.
That cured all of my errors, but the script still didnt' run, instead my screan now reads just one line..
/home/agmiller/public_html/digitalprintreview/commenter.php does not exist
Oddly enough the snippet you gave me did find the file in that directory, but then is reporting that said file isn't in that directory =) Any quick fixes for that? Or is it more likely that my problem is embedded in the php script I downloaded?
Thanks again for all the help!!
Edwards
That cured all of my errors, but the script still didnt' run, instead my screan now reads just one line..
/home/agmiller/public_html/digitalprintreview/commenter.php does not exist
Oddly enough the snippet you gave me did find the file in that directory, but then is reporting that said file isn't in that directory =) Any quick fixes for that? Or is it more likely that my problem is embedded in the php script I downloaded?
Thanks again for all the help!!
Edwards