Welcome to Fluency in Technology
Download
Report
Transcript Welcome to Fluency in Technology
SERVER
web page
repository
WEB PAGE
instructions stores
information and
instructions
BROWSER
retrieves web page
and follows
instructions
2
Web
Server
Pages
Server
1 3
Browser
Client
Two places you can
change
› Browser: JavaScript
› Server: php
General rule:
2
Web
Server
Pages
Server
1 3
› do it in the browser
if you can
Consider the
difference in the
date function…
Browser
Client
2
Web
Server
Pages
Server
Retrieve the web page
Reads each line
› If NOT php, sends it on
› If php,
Performs the action
Sends it on
3
If I look in komodo
edit…
2
Web
Server
Pages
Server
1 3
If I look through
view page
source…
Browser
Client
Files must be .php rather than .html
› Servers will find and use index.php as the
default if there is no index.html
PHP command format
› <?php … ?>
› Commands always end with ;
Command of interest is
› include(“file name”)
Single line
› // comment
Multiple line
› /* line
›
continues */
For includes, optional
You MAY, you NEED NOT
If you are interested,
› Decide what function it brings
› Command specifically to look at
echo to create text for HTML
› May want to start with
date