Unable To Open 'C' For Reading, Error.
| From: | Dr. Shim | Date: | Wed, 08 May 2002 23:11:25 +0000 |
| Subject: | Unable To Open 'C' For Reading, Error. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96706@lists.php.net to get a copy of this message | ||
I got part of my script (the upload portion) from a book, so I didn't think
anything could go wrong, but I keep getting this error:
Warning: Unable to open 'C' for reading: No such file or directory in
c:\documents and settings\daniel j lawhead\my documents\www\new
grounds\admin\includes\files.php on line 22
I have no idea what's wrong, here's my script.
<?php
if(!is_dir("../../images/")) {
echo "<font color=\"yellow\">Directory does not exist,
creating...</font><br>\n";
@mkdir("../../images") or die("<p><span
class=error>Error!</span></p>.");
// I've taken out the real message, it was far too long!
}
/*Line 22*/ if (copy($_POST['image']['tmp_name'], "../../images/" .
$_POST['image']['name'])) {
echo "<font color=\"green\"><b>File uploaded and moved to
\"images\"
directory<b></font><br><br>\n";
}
$filename = $_FILES['image']['name'];
$filepath = $_FILES['image']['dir'];
?>
Sinceriously Cheerious,
Dr. Shim