Top Banner
15

Php Básico Octubre 2011

Nov 18, 2014

Download

Technology

programadoresmx

Es la presentación utilizada para el taller de php básico realizado en las instalaciones de telemexhub los sabados
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Php Básico Octubre 2011
Page 2: Php Básico Octubre 2011

Comunidad

Comunidad de phpwww.comunidadphp.orgTwitter: @programasphp

Presentador:Claudio Morales

@pronuerwww.pronuer.mx

Page 3: Php Básico Octubre 2011

Rasmus Lerdorf 1994

PHP Tools O Personal Home Page Tools

PHP Hypertext Pre-processor

Que es PHP

Page 4: Php Básico Octubre 2011

Pedir porta

l web www.dominio.co

m

Regresa archivo htm

l

Como funciona html

Page 5: Php Básico Octubre 2011

Pedir porta

l web www.dominio.co

m

Regresa archivo

html

InterpretaPHP

Como funciona PHP

Page 6: Php Básico Octubre 2011

PHPMYSQL

FTP

Apache

Servidor Web

Page 7: Php Básico Octubre 2011

Editores

Page 8: Php Básico Octubre 2011

Archivo.php

<?php?>

///**/

$variable = “cadena texto”;

echo “cadena de texto”;

<?php

echo “Hola Mundo”; ?>

Sintaxis Basico

Page 9: Php Básico Octubre 2011

Variables

$numero = 5;

Constantes

Define(“conste_pi“, “3.14”);

$numero = conste_pi;

$numero = 5;

$texto = “Es un valor”;

$boleano = true;

$texto = ‘Es otro valor’;

$areglo[0] = 5;$areglo[1] = 6;

$moneda[“mexico”] = “peso”;$moneda[“eu”] = “dollar”;$moneda[“brasil”] = “real”;

Tipos de datos

Page 10: Php Básico Octubre 2011

Operadores Aritméticos

+, -, *, /, %

Operadores Asignación

=, .=, +=, *=, /=, -=, %=

Operadores cadena

.

Operadores Comparación==, ===, !=, !==, <, >, <=, >=

Operadores Lógicos

And, && , or, ||, xort, !

Operadores Incremento

$a++; $a--;

Operadores

Page 11: Php Básico Octubre 2011

ORAND

= += -= *= /= .= %= -= <<= >>=|| &&&

== != ===< <= > >=

<< >>* / %+ - .

Procedencia Operadores

Page 12: Php Básico Octubre 2011

If(condicion) operaciones

If($a<1) { echo “paso;” }else { echo “no paso”; }

switch ($i){

Case 0: Operaciones

Case 1:operaciones

}

Sentencias condicionales

Page 13: Php Básico Octubre 2011

while ($i <= 10) { operaciones }

do {operaciones} while ($i>0);

for ($i = 1; $i <= 10; $i++) { operaciones }

Sentencias repetitivas

Page 14: Php Básico Octubre 2011

foreach ($arrego as $clave => $valor) { echo ”la posición es: $clave y contiene $valor”; }

Estructuras repetitivas

Page 15: Php Básico Octubre 2011

Contacto

Comunidad de phpwww.comunidadphp.orgTwitter: @programasphp

Presentador:Claudio Morales

Twitter: @pronuerwww.pronuer.mx