If you have any suggestions or comments, and would prefer using email, please contact me at:
gngabriel29[REMOVETHISANDREPLACEWITHYOU-KNOW-WHAT]ymail.com

September 27, 2008

Create a simple php file

Filed under: PHP/PHP Basics


We will be creating a simple php file, to display a line in the browser, and to show some php settings.

Note that php code must be placed between a pair of open and close php tags.

A open php tag is:

<?php

A close php tag is:

?>

In this case, the actual php code in between the two tags is:

echo "This line is created by PHP";

This results in the browser showing:

This line is created by PHP

To see some settings of php, for the server which test.php is running on, we add the below line of code:

phpinfo();

simple php using phpinfo func

This results in the browser showing, some settings of php:

simple php using phpinfo func, browser output

We have come to the end of this tutorial, hope this simple introduction to php helps new php programmers. Take care and see ya.

Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>. I unfortunately do not have a spoiler-code, so be sure mark spoilers well.



Anti-spam measure: please retype the above text into the box provided.