Semis Lecture 1 Flashcards
___ is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
PHP
PHP is a ___, and a powerful tool for making dynamic and interactive Web pages.
server scripting language
PHP is a widely-used, free, and efficient alternative to competitors such as ___.
Microsoft’s ASP
sample php code block
<html>
<body>
< ?php
echo "My first PHP
script!"; ? >"
</body>
</html>
PHP is an acronym for…
“PHP: Hypertext Preprocessor”
PHP is a widely-used, …
open source scripting language
___ are executed on the server
PHP scripts
PHP is free to ___
download and use
What is a PHP File? PHP files can contain… (5)
text, HTML, CSS, JavaScript, and PHP code
___ are executed on the server, and the result is returned to the browser
as plain HTML
PHP code
PHP files have extension…
“.php”
What Can PHP Do?
* PHP can generate ___
* PHP can ___ on the server
* PHP can collect ___
* PHP can ___ cookies
* PHP can ___ in your database
* PHP can be used to ___
* PHP can ___
dynamic page content;
create, open, read, write, delete, and close files;
form data;
send and receive;
add, delete, modify data;
control user-access;
encrypt data
With PHP you are not limited to ___. You can output (a), (b), and even (c). You can also output any text, such as (d) and (e).
output HTML; (a) images, (b) PDF files, (c) Flash movies, (d) XHTML, (e) XML
Why PHP?
* PHP runs on ___ (Windows, Linux, Unix, Mac OS X, etc.)
various platforms
Why PHP?
* PHP is compatible with ___ (Apache, IIS, etc.)
almost all servers used today
Why PHP?
* PHP supports a ___
wide range of databases
Why PHP?
* PHP is ___. Download it from the official PHP resource: www.php.net
free
Why PHP?
* PHP is ___ and ___ on the server side
easy to learn; runs efficiently
To start using PHP, you can:
* Find a ___ with PHP and MySQL support
* Install a ___ on your own PC, and then install PHP and MySQL
web host; web server
Use a Web Host with PHP Support
* If your server has activated support for PHP…
* Just create some ___, place them in your web directory, and the server will automatically parse them for you.
* You do not need to compile anything or install any extra tools.
* Because PHP is free, most ___ offer PHP support.
* Set Up PHP on Your Own PC
you do not need to do anything;
.php files;
web hosts
However, if your server does not support PHP, you must:
* install a (a)
* install (b)
* install a (c), such as MySQL
(a) web server;
(b) PHP;
(c) database
Basic PHP Syntax
* A ___ can be placed anywhere in the document.
* A PHP script starts with ___ and ends with ___
PHP script; <?php & ?>
sample of basic php syntax
<?php
// PHP code goes
here ?>
Example
<html>
<body>
<h1>My first PHP page</h1>
</body>
</html>
- PHP statements end with a ___
semicolon (;)
"; EcHo "Hello World!
"; ?> does all those echos work?
"; echo "My boat is " . $coLOR . "
"; ?>
"; echo $y; ?>