Re: the curse of the period
| From: | Jason Wong | Date: | Tue, 11 Jun 2002 09:33:02 +0000 |
| Subject: | Re: the curse of the period | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101512@lists.php.net to get a copy of this message | ||
On Tuesday 11 June 2002 17:04, hugh danaher wrote:
> I have a php page which gets a file upload from the user and attempts to
> put the file in a remote directory. It is failing big time with the
> following warning:
>
> Warning: Unable to create '../landmark/photos/8000.jpg': No such file or
> directory in /home/www/location/museum/trees/admin/upload2.php on line 27
>
> The directory and file name:
> museum/trees/admin/upload2.php
>
> The directory I want to store the uploaded file is:
> museum/landmark/photos/
>
> I've tried two dots, three dots and more but have yet to hit upon the
> combination of dots, slashes or phases of the moon to keep the program from
> puking!
>
> P.S. The page works if the storage directory is closer.
'closer' has nothing to do with it!
Easy way: use absolute directory paths.
Harder way: the path is relative to wherever your script which in this case is
"museum/trees/admin/", you want to go "museum/landmark/photos/" which is 2
directories up. Thus "../../landmark/photos/"
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Growing old isn't bad when you consider the alternatives.
-- Maurice Chevalier
*/