Bonjour,
Je migre mon site vers un nouveau serveur en php5.6 avec Apache et certains de mes codes n'affichent plus le résultat.
Par exemple ce code affichait une photo miniature mais là ne l affiche plus. Comment le modifier ?
Je suis pas à l aise dans ces évolutions de requête à la base de données..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 <?php $requete_photo="SELECT fichier from news_photos as vp, photos as p where p.photo_id=vp.photo_id and vp.new_id='".$list['new_id']."'"; $resultat_photo=send_sql($requete_photo); $list_photo=mysql_fetch_assoc($resultat_photo); $size = resize_image($CONF_URL_LOCAL.'images/'.str_replace('.jpg', '-thb.jpg', $list_photo['fichier']), 290, 290); ?> <img src='<? echo $CONF_URL_SERV."images/".str_replace('.jpg', '-thb.jpg', $list_photo['fichier']); ?>' width='<?php echo $size['width']; ?>' />
J'ai un autre soucis concernant les images affichées avec ce code ci:
Cela fonctionnait très bien avant mais là une partie seulement des images sont affichées et d'autres non. En regardant le log error pour l accès Apache il affiche pour les images non affichées un message de type: GET /images/nomdelimage.jpg HTTP/1.1
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 <?php $requete_video = "SELECT * from news order by date desc, heure desc limit 0,40"; $resultat_video = send_sql($requete_video); while($list_video = mysql_fetch_assoc($resultat_video)) { $requete_photo="SELECT fichier from news_photos as vp, photos as p where p.photo_id=vp.photo_id and vp.new_id='".$list_video['new_id']."'"; $resultat_photo=send_sql($requete_photo); $list_photo=mysql_fetch_assoc($resultat_photo); $size = resize_image_force($CONF_URL_SERV.'/images/'.str_replace('.jpg', '-thb.jpg', $list_photo['fichier']), 632, auto); ?> <div class="grid-item"> <div class="project_img3" style="overflow:hidden;"> <center> <a class="lien_no" href="<?php echo link_actu($list_video['new_id']); ?>" title="<?php echo $list_video['titre']; ?>"> <img class="project_img3" src="<?php echo $CONF_URL_SERV.'images/'.str_replace('.jpg', '-thb.jpg', $list_photo['fichier']); ?>" alt="<?php echo $list_video['titre']; ?>" width="<?php echo $size['width']; ?>" height="<?php echo $size['height']; ?>" /> </a> </center> </div>
Partager