Bonjour,
Si une âme charitable veut bien me donner une aide, je débute et j'ai chercher sur google ect..rien trouver et je m'en remet à vous ! voila j'ai télécharger une script petite annonce mais je n'ai pas d'image j'ai le message, je vous joint le fichier php plus bas nommer miniature.php, je ne sais pas comment résoudre cette erreur c'est un problème de chemin d'image je suppose ect...Merci de votre aide si vous avez du temps !
Salutations
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 Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php:5) in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 24 Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 25 Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 43 Warning: imagesx(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 44 Warning: imagesy(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 44 Warning: imagesx(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 44 Warning: imagesy(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 44 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock.com/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 44 Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/monpac/public_html/destock/demopetiteannonce/region/Rhone-Alpes/photo-video/miniature.php on line 45
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 <?php error_reporting(E_ALL ^ E_NOTICE); /// A definir dans l'url d'appel : url complete de l'image ainsi que $w_max et $h_max $taille = getimagesize("$pic"); $h_i = $taille[1]; $w_i = $taille[0]; if($h_i >$h_max) { $convert=$h_max/$h_i; $h_i=$h_max; $w_i=ceil($w_i*$convert); } if($w_i >$w_max) { $convert=$w_max/$w_i; $w_i=$w_max; $h_i=ceil($h_i*$convert); } ; $largeur = "$w_i"; $hauteur ="$h_i"; header("Content-Type: image/jpeg"); list($width, $height, $type, $attr) = getimagesize("$pic"); if($type == "1") { $img_in = imagecreatefromgif($pic); } if($type == "2") { $img_in = imagecreatefromjpeg($pic); } if($type == "3") { $img_in = imagecreatefrompng($pic); } $img_out = imagecreatetruecolor($largeur, $hauteur); imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, imagesx($img_out), imagesy($img_out), imagesx($img_in), imagesy($img_in)); $t = imagejpeg($img_out); echo $t; ?>
Partager