Theory 
NSW Schools
Maths
Science
Documentation
Efficiency
Media
Databases
E-commerce
Reporting
Reviews
Data
Simulation
Maths
Computing
Encoding
 

Theory

php information

Simple Introduction to PHP

PHP Functions


php_info.php

The source code of this (php_info.php) file is:

<html><HEAD></HEAD><body>
<?php phpinfo(); ?>
</body></html>

hello.php

The source code of this (hello.php) file is:

<html><HEAD></HEAD><body>
<?php $statement ="Hello World"; echo ("$statement"); ?>
</body></html>

helloname.php?name=Barney Rubble

The source code of this (helloname.php) file is:

<html><HEAD></HEAD><body>
<P>Hello <?php echo "$name;" ?>
<PRE>You accessed this script using the filename:
helloname.php?name=<?php echo "$name;" ?></PRE>
<ul>
<li>Why dont you try another extension helloname.php?name=anything you like
<li>Remember blank spaces in URLs can sometimes cause problems
</ul>
</body></html>

The Date Function

today.php

Today's Date (according to this Web server) is:
<?php echo( date("l, F dS Y.") ); ?>

The source code of this (today.php) file is:

<html><HEAD></HEAD><body>
<P>Today's Date (according to this Web server) is:
<BR><?php echo( date("l, F dS Y.") ); ?>
</body></html>

Environment Variables

remote_info.php

The source code of this (remote_info.php) file is:

<html><HEAD></HEAD><body>
<P>Remote Address: <?php echo $REMOTE_ADDR; ?>
<P>Remote Host: <?php echo $REMOTE_HOST; ?>
<P>Remote Port: <?php echo $REMOTE_PORT; ?>
<P>Remote User: <?php echo $REMOTE_USER; ?>
<P>User Agent (Browser): <?php echo $HTTP_USER_AGENT; ?>
</body></html>

Inline Image - Go To www.precisioninfo.com