Hola. Entrega del ejercicio CU00831B del curso básico de programación web con PHP.
Codigo de la página Completo (ejercicios 1 y 2):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>PHP Desde cero aprenderaprogramar.com</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 1.27" />
<style type="text/css">
body{ text-align:center; background-color:yellow; color:blue;}
h1, h2{text-align:center; color:blue;padding:0; margin:0;}
div{
text-align:center;
background-color:orange;
height:400px;
width:250px;
padding:50px;
margin:20px;
float:left;
}
</style>
</head>
</head>
<body>
<h1>Ejercicio 31 (CU00831B)</h1>
<?php echo ' <div><h2> Ejercicio 1</h2>'; date_default_timezone_set ('Europe/Madrid');setlocale(LC_TIME, 'es_ES.UTF-8');$Mes="5";$Dia="9"; $Año="2035"; mostrarDiaMes($Mes,$Dia, $Año);echo'</div>';echo '<div>';echo '<h2>Ejercicio 2 </h2>';/* Establecer el localismo al holandés */ setlocale(LC_TIME, 'nl_NL.UTF-8'); mostrarDiaMes($Mes,$Dia, $Año);echo '<br/><br/> </div>'; function mostrarDiaMes($M,$D,$A) { $Fecha=gmmktime(0,0,0,$M,$D,$A);// Para coger nº de dias del mes $m=1; for ($i=$D;$i<=date("t",$Fecha);$i++) { $Fecha=gmmktime(0,0,0,$M,$i,$A); echo strftime(" %d de %B de %Y ", $Fecha)."<br/>"; } } ?>
</body>
</html>
Enlace a la pagina del ejercicio:
http://paramonso.byethost7.com/Ejercicio31(CU00831B)%20.php?i=2 (http://paramonso.byethost7.com/Ejercicio31(CU00831B)%20.php?i=2)
Hasta el 32. Jueves ;)