Re: File uploading
| From: | Angie Tollerson | Date: | Mon, 17 Sep 2001 19:20:23 +0000 |
| Subject: | Re: File uploading | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-9391@lists.php.net to get a copy of this message | ||
Frankie,
the function is copy($old, $new);
so it needs to be from the exact path to the exact path....what is the folder you want to store the
file in eventually? the best thing to do is to set the path for the folder where the new file will
be residing and tack on the image
for example:
$PATH = "../news/archive/images/";
$userpath = "c:\windows\images\picture.jpg"; // ( gotten by them doing a browse of
computer using type="file" ??? maybe??)
$newimagename = "new.jpg";
copy($userpath, $PATH.$newimagename);
hope that helps,
Angie
>>> "Frankie" <frankiepaul@libero.it> 09/17/01 02:01PM >>>
I have a problem with the file uploading.
I copied a script from a book on PHP and I followed instructions about the
upload temp dir (upload_tmp_dir = c:/Windows/temp). The script was developed
for an Unix machine and the line is:
@copy("$img1","/usr/local/apache_1.3.12/htdocs/$img1_name") or die...
The book suggests, for Windows machines, to change the root in:
/Apache/htdocs. I tried the program, but an error message appears: "It is
impossible to upload file" (message wrote in die command).
What is the exact command for uploading file?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net