miércoles, 9 de septiembre de 2015

Clase No. 23- Agosto 19


  • Crear sitio web con el número del Pc y el primer apellido de ambos integrantes.
  • Crear una aplicación que cuando se ejecute:
    • Si es un Pc, debe llamar a slider con 13 imágenes por medio de un for.
    • Si es un móvil, debe llamar un slider con imágenes desde la 9 a la 13.
  • SOLUCIÓN:
    • <html>
      <head>
      <?php require_once (‘Mobile_Detect/Mobile_Detect.php’);
      $detect = new Mobile_Detect(); ?>
      <title></title>
      </head>
      <body>
      <?php
      $entro = “N”;
      if ($detect->isMobile()) {
      echo “<br>Es un Movil”; 
      echo header(“Location:slider/index1.php”);
      $entro = “S”;

      }
      if ($detect->isTablet()) {// Si es un tablet
      echo “<br>Es una Tablet”;
      $entro = “S”;
      }
      if ($detect->isAndroidOS()) {// Si es Android
      echo “<br>Es un Android”;
      $entro = “S”;
      }
      if ($detect->isiOS()){//Si es iOS
      echo “<br>Es un Mac”;
      $entro = “S”;
      }
      if ($entro == “N”){
      echo “<br>Es un Pc”;
      echo header(“Location:slider/index.php”);
      }
      echo $detect->isMobile();
      ?>
      </body>
      </html>









No hay comentarios:

Publicar un comentario