Page 1 sur 1

probleme d'affichage

Posté : 29 août 2011, 17:47
par petinico
bonjour,

j'ai un code pour afficher des photos choisies venues d'une bdd. Sur mon portable, tout fonctionne et tout s'affiche, mais sur le pc, aucune photo ne s'affiche. je croyais que c'etait dû au cache du navigateur, mais cache effacé et ordi redemarré, c'est pas mieux.

voici mon code :
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
	<title>Test</title>
</head>
<body>
 
<?php
$num_img_defaut_texte = htmlentities(trim('n° de photo à afficher'));
$num_img = (isset($_POST['numero_affich_photo']) && htmlentities(trim($_POST['numero_affich_photo']))!=$num_img_defaut_texte)? htmlentities(trim($_POST['numero_affich_photo'])) : ''; ?>
<table style="border:0; border-collapse:separate;">
	<tr>
		<td style="border:1px solid blue; height:25px;">
			<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
			<input type="text" name="numero_affich_photo" value="<?php echo ($num_img!='')? $num_img : $num_img_defaut_texte; ?>" onfocus="this.value='';" onblur="if(this.value==''){this.value='<?php echo $num_img_defaut_texte; ?>'};" />
			<input type="submit" name="btenvoiphoto" value="Afficher la photo" />
			</form>
		</td>
		<td rowspan="2" style="border:1px solid red; height:550px; width:100px;">
<?php		if($num_img!='' && file_exists('images/bdd1/'.$num_img.'.jpg')) { ?>
			<img src="images/bdd1/<?php echo $num_img; ?>.jpg" style="border:3px solid #000; height:550px;" alt="photo" />
<?php		} elseif($num_img!='') { ?>
			numero d'image inexistant !
<?php		} ?>
		</td>
	</tr>
	<tr>
		<td style="border:1px solid green; height:525px;">
			toto
		</td>
	</tr>
</table>
 <script language="JavaScript1.1">
<!--
hsh = new Date();
hsd = document;
hsr = hsd.referrer.replace(/[<>]/g, '');
hsi = '<a href="http://www.xiti.com/xiti.asp?s=119801"';
hsi += ' TARGET="_top"><img width="39" height="25" border=0 ';
hsi += 'src="http://logv22.xiti.com/hit.xiti?s=119801';
hsi += '&p=admin';
hsi += '&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xiti_s=screen;hsi += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
hsd.writeln(hsi + '&ref=' + hsr.replace(/&/g, '$') + '" title="Mesurez votre audience"></a><\!--');
//-->
</script>
<noscript>
<a href="http://www.xiti.com/xiti.asp?s=119801" TARGET="_top"><img width="39" height="25" border=0 src="http://logv22.xiti.com/hit.xiti?s=119801&p=&admin" title="Mesurez votre audience"></a>
</noscript><!--//-->
</body>
</html>
je patauge depuis un moment, si quelqu'un a une idee... merci par avance

Re: probleme d'affichage

Posté : 30 août 2011, 21:36
par Ryle
Et quel est le problème que tu rencontres exactement ? affichage blanc ? croix rouge à la place de l'image ? ...

Ton site php est situé où ? sur le pc ? sur le portable ? chacun le sien ? sur un serveur ?

Regarde le code source de la page générée depuis ton pc et vérifies que :
- la balise de l'image apparait bien
- l'url de l'image est bonne
- ...