PHP - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

PHP

Description:

Check your quotes ?php. echo 'Hello. The white screen of death. Check your curly braces ?php. if ($a == $b) { echo 'True!'; Check your parentheses ?php. echo ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 22
Provided by: randy99
Category:
Tags: php | check

less

Transcript and Presenter's Notes

Title: PHP


1
PHP
2
PHP HypertextPreprocessor
3
Client
Server
HTTP server
PHP
Should therequested filebe processedby PHP?
HTTP request
4
Client
Server
HTTP server
PHP
Should therequested filebe processedby PHP?
HTTP request
No
Add HTML from the file to an HTTPresponse
HTTP response
5
.php file extension turns on PHP interpreter(on
our server)
6
Client
Server
HTTP server
PHP
Should thefile requestedbe processedby PHP?
HTTP request
Execute any PHP code in the file
Yes
Send interpreted file to HTTP server
Add PHP output as HTML to an HTTPresponse
HTTP response
7
.php file extension turns on PHP interpreter(on
our server)
8
HTTP server
PHP
hello.php
...ltpgtlt?php echo "hello"?gtlt/pgt...
GET hello.php
...ltpgthellolt/pgt...
HTTP response
9
PHP code
Open and close tags
lt?php?gt
10
PHP code
Statements
lt?php echo "Hi"?gt
11
PHP code
Semicolons!
lt?php echo "Hi"?gt
12
PHP code
Comments
lt?php outputs Hi echo "Hi"?gt
13
PHP code
Types Numbers
lt?php integer 1 float 1.1?gt
14
PHP code
Types Strings
lt?php string "Hi" string 'Hi'?gt
15
PHP code
Escaping in strings
lt?php msg "Say \"Hi\""?gt
16
PHP code
Combining strings
lt?php s "Hi"." there" s "Hi there"?gt
17
PHP code
Types Arrays
lt?php array array() array 'Hi'
array0 Hi?gt
18
(No Transcript)
19
The white screen of death
Check your semicolonslt?php echo "Hello"?gt
20
The white screen of death
Check your semicolonslt?php echo "Hello"?gt
Check your quoteslt?php echo "Hello?gt
21
The white screen of death
Check your parentheseslt?php echo("Hello"?gt
Check your curly braceslt?php if (a b)
echo "True!"?gt
Write a Comment
User Comments (0)
About PowerShow.com