Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 211 Pomógł: 0 Dołączył: 8.12.2008 Ostrzeżenie: (0%)
|
Witam !
Zrobiłem upload grafiki w CMS'ie php-fusion i mam problem , przy wgraniu obrazka pokazuje mi się coś takiego : Kod Warning: move_uploaded_file(images/news/2009-06-18_200847.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/rxxxxxxx on line 80 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpW8Vx76' to 'images/news/2009-06-18_200847.jpg' in /home/xxxxxx on line 80 Warning: chmod() [function.chmod]: No such file or directory in /home/xxxxxx on line 81 80 i 81 linia to : Kod move_uploaded_file($imgtemp, $afolder.$imgname); chmod($afolder.$imgname,0644); Kod $zdjecie = false; if($_FILES['myfile'] != '') { $error = ""; $image_types = array( ".gif", ".GIF", ".jpeg", ".JPEG", ".jpg", ".JPG", ".png", ".PNG" ); $imgext = strrchr($_FILES['myfile']['name'], "."); $imgname = $_FILES['myfile']['name']; $imgsize = $_FILES['myfile']['size']; $imgtemp = $_FILES['myfile']['tmp_name']; if (!in_array($imgext, $image_types)) { } elseif (is_uploaded_file($imgtemp)){ move_uploaded_file($imgtemp, $afolder.$imgname); chmod($afolder.$imgname,0644); $zdjecie = $imgname; } } A to kod całego wgrywania obrazka Kod echo "<form name='inputform' method='post' action='".FUSION_SELF.$aidlink."' enctype='multipart/form-data' onsubmit='return ValidateForm(this);'>\n"; echo "<td class='tbl'><input type='file' name='myfile' class='textbox' style='width:250px;' /></td></tr>\n"; echo "<input type='submit' name='save' value='".$locale['437']."' class='button' /></td>\n"; echo "</tr>\n</table>\n</form>\n"; A tutaj wycięty kawałkami formularz . Ten post edytował Artu123 15.07.2009, 12:35:35 |
|
|
|
Artu123 Problem z wgraniem obrazka przez stronę 15.07.2009, 12:34:40
erix CytatUnable to move '/tmp/phpW8Vx76' to ... 15.07.2009, 12:45:50
Artu123 Użyłem tego:
Kod$afolder = IMAGES_N;
i dzia... 15.07.2009, 12:49:39 ![]() ![]() |
|
Aktualny czas: 20.12.2025 - 21:36 |