![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
23/01/2010, 15:20
|
| | Fecha de Ingreso: diciembre-2007
Mensajes: 19
Antigüedad: 17 años, 2 meses Puntos: 0 | |
Respuesta: Cambiar fondo de web Que tal gracias por responder, lo puse de la siguiente manera me dio un error
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?
if(date("H:i:s")<="11:00:00"){ //cuando sean menos o igual a las 11
$imagen="madrugada.jpg"; }
elseif(date("H:i:s") >="12:00:00") { //cuando sean mas o igual a las 12
$imagen="images/fondo2.jpg" }
elseif(date("H:i:s")>="15:30:00") {//cuando sean mas o igual a las 15:30
$imagen="images/fondo3.jpg"; }
else { //si no es ni una de las anteriores
$imagen="default.jpg";
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body background="<? echo $imagen ?>">
</body>
</html>
Parse error: syntax error, unexpected '}' in C:\AppServ\www\index.php on line 8 |