Page 1 sur 1

Bug a l'affichage d'une variable

Posté : 27 juin 2010, 12:36
par Khogniak
Voila, mon code;
<html><head><title>font-face</title>
<style type="text/css">
@font-face {
font-family: DOOM;
font-style: normal;
font-weight: normal;
src: url(DOOM.eot);

.police {
font-family: Morpheus, Arial, sans-serif;
font-size: 36px;
color: #008000;
}
</style>
</head><body>
<br /><br /><br /><br /><br /><br /><p class="police"><center><h1>Back is for;<br />J-
<?php
$day = 25;
$month = 07;
$year = 2010;
$days = (int)((mktime (0,0,0,$month,$day,$year) - time(void))/86400);
if ($days>=0){
echo $days;
}
?>
</h1></center></p>
</body>
</html>
Voila ce qui s'affiche;
Back is for;
J- =0){ echo $days; } ?>

Re: Bug a l'affichage d'une variable

Posté : 27 juin 2010, 13:09
par Ganesh
Bonjour,

A tout hasard, il n'y aurait pas un ? entre $days et > dans le code que tu testes ?

Re: Bug a l'affichage d'une variable

Posté : 27 juin 2010, 14:45
par Khogniak
Non :(

Re: Bug a l'affichage d'une variable

Posté : 27 juin 2010, 15:06
par Ryle
Ton code PHP n'est pas interprété (ce que tu as entre <?php et ton signe "inférieur" est considéré comme une balise html qui n'apparait pas à l'écran, d'où l'affichage que tu obtiens) ... ton script est bien exécuté sur un serveur php ?