Getting Started With PHP
Getting Started With PHP
httpd.conf
PHP Programming with MySQL, 2nd Edition 9
Configuring Apache (continued)
• Directives define information about how a
program should be configured
• The DocumentRoot directive identifies the
default directory from where Apache serves
Web pages
• The Alias directive identifies other directories
that Apache can use to serve Web pages
– my is located in:
\UniServer\usr\local\mysql
<?php
echo “<p>Explore <strong>Africa</strong>, <br />”;
Echo “<strong>South America</strong>, <br />”;
ECHO “ and <strong>Australia</strong>!</p>”;
?>
$x = 10;
$y = 7;
$x -= $y;
echo $x;
PHP Programming with MySQL, 2nd Edition 70
Comparison and Conditional
Operators
• Comparison operators are used to compare two
operands and determine how one operand
compares to another
• A Boolean value of true or false is returned after
two operands are compared
• The comparison operator compares values,
whereas the assignment operator assigns values
• Comparison operators are used with conditional
statements and looping statements
$MortgageRate = .0575;
(is_double(MortgageRate)) ?Result =
“Contains decimal”:
Result = “No decimal”;
Echo $Result