Re: file uploads
| From: | Pavel Jartsev | Date: | Mon, 01 Dec 2003 15:10:27 +0000 |
| Subject: | Re: file uploads | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171471@lists.php.net to get a copy of this message | ||
Jon Bennett wrote:
Just to clarify about using move_uploaded_file() ... function addProduct(){Just noticed one thing... maybe it's just a typo, but directory, where You save uploaded image isn't the same in those examples. In "move_uploaded_file()" it contains "_img/...", but in "storeBigImage()" there is "_lib/...". And therefore first case is working and second isn't. -- Pavel a.k.a. Papi// Move the uploaded file to the correct location move_uploaded_file($$_FILES["image"]["tmp_name"], BASE_DIR."/_img/_products/".$iProductId."_".$fileName);} ...function storeBigImage($ID, $aImage){// create filenames fopen($aImage['name'], 'r'); $aNewImage['real_name'] = $aImage['name']; $aNewImage['new_name'] = $ID . '_' . 'big' . '_' . $aNewImage['real_name']; $aNewImage['image_loc'] = BASE_DIR . '_lib/_products/' . $aNewImage['new_name']; ...