Re: Unable To Open 'C' For Reading, Error.
| From: | David Robley | Date: | Thu, 09 May 2002 03:26:36 +0000 |
| Subject: | Re: Unable To Open 'C' For Reading, Error. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96752@lists.php.net to get a copy of this message | ||
In article <20020508231128.4415.qmail@pb1.pair.com>,
ultimatezzz@hotmail.com says...
> 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'];
> ?>
Try echoing some of your variables and see if they are waht you expect.
--
David Robley
Temporary Kiwi!
Quod subigo farinam