Php Básico Octubre 2011
-
Upload
programadoresmx -
Category
Technology
-
view
604 -
download
8
description
Transcript of Php Básico Octubre 2011
![Page 1: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/1.jpg)
![Page 2: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/2.jpg)
Comunidad
Comunidad de phpwww.comunidadphp.orgTwitter: @programasphp
Presentador:Claudio Morales
@pronuerwww.pronuer.mx
![Page 3: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/3.jpg)
Rasmus Lerdorf 1994
PHP Tools O Personal Home Page Tools
PHP Hypertext Pre-processor
Que es PHP
![Page 4: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/4.jpg)
Pedir porta
l web www.dominio.co
m
Regresa archivo htm
l
Como funciona html
![Page 5: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/5.jpg)
Pedir porta
l web www.dominio.co
m
Regresa archivo
html
InterpretaPHP
Como funciona PHP
![Page 6: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/6.jpg)
PHPMYSQL
FTP
Apache
Servidor Web
![Page 7: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/7.jpg)
Editores
![Page 8: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/8.jpg)
Archivo.php
<?php?>
///**/
$variable = “cadena texto”;
echo “cadena de texto”;
<?php
echo “Hola Mundo”; ?>
Sintaxis Basico
![Page 9: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/9.jpg)
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](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/10.jpg)
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](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/11.jpg)
ORAND
= += -= *= /= .= %= -= <<= >>=|| &&&
== != ===< <= > >=
<< >>* / %+ - .
Procedencia Operadores
![Page 12: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/12.jpg)
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](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/13.jpg)
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](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/14.jpg)
foreach ($arrego as $clave => $valor) { echo ”la posición es: $clave y contiene $valor”; }
Estructuras repetitivas
![Page 15: Php Básico Octubre 2011](https://reader033.fdocuments.ec/reader033/viewer/2022061120/546c0f74b4af9f6b2c8b4ec2/html5/thumbnails/15.jpg)
Contacto
Comunidad de phpwww.comunidadphp.orgTwitter: @programasphp
Presentador:Claudio Morales
Twitter: @pronuerwww.pronuer.mx