Hallo Leute,
Ich möchte gerne das "Members Photo Upload" Modul für PostNuke anpassen (war ursprünglich PHP-Nuke)
Habe es auch fast geschaft aber leider spuckt der Fehlermeldungen raus wenn ich das Bild abgeschickt habe (auf meinem lokalem PC):
Warning: Rename failed (No such file or directory) in c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php on line 111
Warning: Cannot add header information - headers already sent by (output started at c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php:111) in c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php on line 115
Was stimmt daran nicht?
Hier die Zeilen mit Zeilennummerierung:
100: // Copy handler for the above arrays
101: for($I = 0; $I <=6; $I++){
102: $file[$I] = ereg_replace(" ", "_", $file[$I]);
103: $file[$I] = ereg_replace("%20", "_", $file[$I]);
104: $copyfile = "$upload_dir/$file[$I]";
105: @move_uploaded_file($original[$I], $copyfile);
106: @unlink($original[$I]);
107:
108:
109: // This will rename the uploaded file to their username, no matter what file name they use.
110: // You can change $user.jpg to $user.gif or whatever you want.
111: rename ("$upload_dir/$file[$I]", "$upload_dir/$user.$type");
112:
113:
114: //return thank you page
115: Header("Location: $thankspage");
Kann mir jemand helfen?
Ich möchte gerne das "Members Photo Upload" Modul für PostNuke anpassen (war ursprünglich PHP-Nuke)
Habe es auch fast geschaft aber leider spuckt der Fehlermeldungen raus wenn ich das Bild abgeschickt habe (auf meinem lokalem PC):
Warning: Rename failed (No such file or directory) in c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php on line 111
Warning: Cannot add header information - headers already sent by (output started at c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php:111) in c:apachehtdocspost2modulesMembers_Photo_Uploadupload.php on line 115
Hier die Zeilen mit Zeilennummerierung:
100: // Copy handler for the above arrays
101: for($I = 0; $I <=6; $I++){
102: $file[$I] = ereg_replace(" ", "_", $file[$I]);
103: $file[$I] = ereg_replace("%20", "_", $file[$I]);
104: $copyfile = "$upload_dir/$file[$I]";
105: @move_uploaded_file($original[$I], $copyfile);
106: @unlink($original[$I]);
107:
108:
109: // This will rename the uploaded file to their username, no matter what file name they use.
110: // You can change $user.jpg to $user.gif or whatever you want.
111: rename ("$upload_dir/$file[$I]", "$upload_dir/$user.$type");
112:
113:
114: //return thank you page
115: Header("Location: $thankspage");
Kann mir jemand helfen?
Kommentar