Bonjour voici mon problème :
Au niveau de response. Je devrais avoir la valeur "ok" or j'ai un truc encrypté du genre :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 $("#produit_image").uploadify({ 'uploader' : 'javascripts/uploadify.swf', 'script' : 'uploadify.php', 'cancelImg' : 'images/cancel.png', 'folder' : '../upload/images', 'auto' : true, 'multi' : false, 'method' : 'POST', 'sizeLimit' : 200000000, 'fileDesc' : true, 'fileExt' : '*.jpg;*.jpeg', onError: function (event, queueID ,fileObj, errorObj) { var msg; if (errorObj.status == 404) { alert('Le script d upload n a pas été trouvé'); msg = 'Le script d upload n a pas été trouvé.'; } else if (errorObj.type === "HTTP") msg = errorObj.type+": "+errorObj.status; else if (errorObj.type ==="File Size") msg = "Le poids de l'image envoyée doit-être inférieur à 2 Mo"; else{ msg = errorObj.type+": "+errorObj.text; hasAttach = false; return false; } $('.flash').html('<div class="message error"><p>'+ msg +'</p></div>'); }, onCancel: function (a, b, c, d) { var msg = "Envoi image annulé"; $('.flash').html('<div class="message error"><p>'+ msg +'</p></div>'); hasAttach = false; }, onClearQueue: function (a, b) { var msg = "Cleared "+b.fileCount+" files from queue"; $('.flash').html('<div class="message error"><p>'+ msg +'</p></div>'); hasAttach = false; }, onComplete: function (a, b, c, d, e) { var size = Math.round(c.size/1024); var msg = "Envoi image réussi"; reponse = d; $('.flash').html('<div class="message notice"><p>'+ msg + reponse +'</p></div>'); $('#image').html('<?php echo $_GET['id']; ?>.jpg'); $('#nom_image').val('<?php echo $_GET['id']; ?>.jpg'); } }); });Voici mon script php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part ÿØÿàjÿ넊U*Ğíþ}êïõg¶·±³ w¶ÆÈùC0ÃGßï)ÅÁ~ä®yu0Óöî^욗ùºdþû?Ê2¨rò2y&§´òãM×Xh$-² £üE`iwö:º]åÀ·0ÇNéQÜZèzuuÏÛg?p,è'ù×t3(Æ5 r²ÛTãgvsK.iF_ú+¿¾ëCNÞ_ìo-Ì ¾sàî#¹?ÐVt&YtùmuHZà¾@dµ¾âl2*,ûёë^5ÎR\2*,û3ïE"põdz,¤¹£"¢Ýï\÷üSk¦·]Ô>§úW¡e8¼ҺÃá å'øy·²^là̳,&YA×ÅMF+ñòK«:RÀdUxõ).>ÏÔO/÷²JóH®5jٮ«rÀp¾¸è 6i¥[-ãs÷û×ÑgÜ/È)(bësW¿$]å'ù[_Äù쏈ëçµ\ð´yhE۞[·Ú1_ôü MßZ2=ê,ûёë_cì9Ir(È÷¨³ïF}ÅR\z2*,ûѸzÑ`å%ȣ5}èϽSWÂgþ++ýé?ô^°:W|8±÷ÄM¨þe nÍ+côüëÓGJý; )Jò[¶צÉçO¢º/ó¨´QE})ã KIEÚHÎ? lÓ,Q98ì:j}ùƭ¨ÿñy¨à>ZãõüX:¼·õóµiE;y~'2}ßàìïøËGð´j)3¹Xã71ÇSנ«ñ^ âko;H¾b¿~3òȟU<þÔO ñ >_Ù¯×?Ҽ«JÔïtËØï4û©m®#9Y#l_QáêX¼j©57÷n|vaÅU°9èÊ ÓVõÛ{k -xçïvÂ=?Äå-.xU»Qýïî~JõøeIcWÕцUäê |î3[>J±·äý¬Àf8|}?iBWòê½Q%Q\p´´UÊÊÕpnôÅíY@ԯ=«$ÏRnRO§ùIKEI¡y¶ڤW±FÒG(Ϊ2G?+~ ûjK#ö]fêÔðs ÃxºÚÔ÷ÿ*WÊqj¡¦õ{ù.ß?Èû>ɜæ±UVo7ßÑ~døâRÑ_}ð´Q@%-G·ÈùXÉM/ï]NJþxßBwuÓR¶%²ýæGºýáùWu ʹ;%ÁÁY©¯«£¥]sS~ÈÖÀÖÃ˖¬õCÒªåèRÌ~UcôµÌU2büÒ,ØѼ*Ë|߭LF0£ZÜVÀ É婎ôõµà^øÃÄÐhöyPÙy¥ÆDH9,ԊµcJrvHº4'ZjWl£gÄ ÷cÖÒ_1Ⱦ̕]*`{Å[Ò:ú*k£Gqf¶}èÍG3E2ĀÍW(Tô~A¥ÍF ª¶h±qH³º²5ÍÛû`Vkí·\ÈÚ4ֆØhû̯}Ìaý VG*Om_Y²ҔnçHrq¹Ïᚫâ½÷Ã^"¼ÑoЬÖÒÎ8uþÄsYJ¬=§%õµþGµJÝ{h®SuÜ2½C¿ *=Ȓx>µD*7#Jöò¯*7j_¼¤}E)E=!éÁýê qëVl*/oeYÚ\\ÈÝ(ÙÉü'$· I·d$eäuDRÌÇð&à«#J¶-;ß]K̲ýOaì8®«¥|.oKûºzCó?Cɲ(à¿ySYþGÇß 4vÐþ"ê¶ávÃ<iÝ_Ðä~Ëi²bí=ò+ß?j}ôkÆñ¬öÒ}@XèÙ#¸?Ì×Ï Iåʯºs_a⾳ëGò>>Àý[Rgªùê3Q«2)s^¹ò\£÷STüïøSsHã>§4 - wVcêk^êO*ÝܞÁva!£g¤þÏ:Kj¿m&eÝ =Ãý@Âþ¤~UìþEãM-otðkV©\ð&N¾[ä{*fþÌ~}3ÂSkTpS#d/æI?zñêR=JK¤ÎmÉÿ
Estce que quelqu'un pourrait m'aider à decripter cette variable reponse ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69 if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/'; /* $auv = array('/','..'); $aup = array('',''); $toto = str_replace($auv, $aup, $_REQUEST['folder']); $fileTypes = str_replace('*.','',$_REQUEST['fileext']); if(($fileTypes=="jpg") || ($fileTypes=="jpeg")){ */ if($_FILES['Filedata']['type']='image/jpeg'){ //************************* // Création de vignettes //************************* // Définir les paramètres $oldname = $_FILES['Filedata']['tmp_name']; $normal = $id.".jpg"; $vignette = $id."_tn.jpg"; $newh = 256; $targetNormal = str_replace('//','/',$targetPath) . $normal; $targetVignette = str_replace('//','/',$targetPath) . $vignette; // Interpoler les dimensions $size = getImageSize($oldname); $w = $size[0]; $h = $size[1]; $neww = intval($newh * $w / $h); // Recréer une image de taille inférieure $resimage = imagecreatefromjpeg($oldname); $newimage = imagecreatetruecolor($neww, $newh); imageCopyResampled($newimage, $resimage,0,0,0,0,$neww, $newh, $w, $h); //Sauvegarder la nouvelle image imageJpeg($newimage, $newname, 85); // $fileTypes = str_replace('*.','',$_REQUEST['fileext']); // $fileTypes = str_replace(';','|',$fileTypes); // $typesArray = split('\|',$fileTypes); // $fileParts = pathinfo($_FILES['Filedata']['name']); // if (in_array($fileParts['extension'],$typesArray)) { // Uncomment the following line if you want to make the directory if it doesn't exist // mkdir(str_replace('//','/',$targetPath), 0755, true); move_uploaded_file($tempFile,$targetVignette); move_uploaded_file($tempFile,$targetNormal); }else{ $nomfichier= replace($_FILES['Filedata']['name']); $targetFile = str_replace('//','/',$targetPath) . $nomfichier; move_uploaded_file($tempFile,$targetFile); } echo "ok"; // } else { // echo 'Invalid file type.'; // } } ?>
Partager