![]() |
![]() ![]() |
![]() |
![]()
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 |
|
|
![]()
Post
#2
|
|
![]() Grupa: Moderatorzy Postów: 15 467 Pomógł: 1451 Dołączył: 25.04.2005 Skąd: Szczebrzeszyn/Rzeszów ![]() |
Cytat Unable to move '/tmp/phpW8Vx76' to 'images/news/2009-06-18_200847.jpg' in /home/xxxxxx on line 80 A to nie jest przypadkiem coś z serwerem namieszane? (vide: uprawnienia) -------------------- ![]() ZCE :: Pisząc PW załączaj LINK DO TEMATU i TYLKO w sprawach moderacji :: jakiś błąd - a TREŚĆ BŁĘDU? :: nie ponaglaj z odpowiedzią via PW! |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 211 Pomógł: 0 Dołączył: 8.12.2008 Ostrzeżenie: (0%) ![]() ![]() |
Użyłem tego:
Kod $afolder = IMAGES_N; i działa ![]() |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 03:17 |