Re: copied file is empty
| From: | Jason Wong | Date: | Mon, 14 Apr 2003 18:00:22 +0000 |
| Subject: | Re: copied file is empty | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143822@lists.php.net to get a copy of this message | ||
On Tuesday 15 April 2003 01:41, Mike Tuller wrote:
> I was able to get a file to copy to a folder on my web server, but when
> I open the file, it is empty. The file on my computer has data in it,
> but the files that is on the server has none. Why would this be? here
> is my code.
>
> $importFile = $_FILES['importFile'];
> $importFileName = $_FILES['importFile'] ['name'];
-----------------------------------------^
There shouldn't be a space there.
> copy ($importFileName, "./tmp/" .$importFileName)
> or die ("Couldn't copy the file.");
>
> echo "The file $importFileName was copied successfully!";
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Nearly every complex solution to a programming problem that I
have looked at carefully has turned out to be wrong.
-- Brent Welch
*/