Introduction to PHP
An introduction to the scripting language PHP.
About PHP
In the earlier days of the web most web pages were just HTML but as the web grew more webmasters wanted to created web pages that had functionality. To do this they needed to create scripts. This didn't happen much because, in gneral, scripting languages are harder to learn then simple HTML. This changed when PHP came along because PHP was easy to learn yet very powerful. Even though PHP is a relatively new language it has quickly become one of the most popular scripting languages for the web.Whether or not to learn a scripting language will be a decision you need to make. Depending on how you are going to run your web site, it may or may not be a good decision to learn PHP because there may be other areas you should spend your time on - like creating content or marketing. If you need a script you can always go on sites like hotscripts.com and download one. I think the decision to learn a scripting language is based on whether or not you are a natural coder who can learn it reasonably quickly. It is also based on how much functionality your site will have and how much custom code you will need.
What Is PHP?
PHP stands for "Hypertext Preprocessor" and is an open-source, free, server-side scripting language. "Server-side" means that any of the PHP scripts you have are run on your web server so you don't have to worry about your users not being able to take advantage of your PHP-related features because of what kind of browser they are suing. PHP can be embedded into HTML which is another one of the reasons why it is especially efficient for web page development.Why PHP?
Assuming you have decided that it is worth it to learn PHP, why should you choose PHP over other scripting languages? The reason to learn PHP are: it runs on different platforms (Windows, Linux, Unix, etc.), it is compatible with almost all servers (Apache, etc.), and it is free to download and use. One of the most popular reasons is that PHP supports many databases and works particularly well with MySQL.What can PHP do?
You can pretty much do anything with PHP although most webmasters use it to create forms, process text, generate dynamic page content, or to send and receive cookies, and send e-mail. PHP can output HTML files, any text file, image files, PFD files as well as autogenerate these files and save them or print them. One of the most beneficial features of PHP is its support for databases. Coding a PHP page that is hooked up to a database is easy and this has benefited many amatuer webmasters who needed to set up an e-commerce site.What Do I Need?
Since PHP is a server-side scripting language this means that your web host will need to have PHP set up on their web server. Almost all decent web hosts these days (i.e. non-free hosts) will have PHP available to thier customers. Some PHP tutorials will talk about "installing PHP" but as a new webmaster you will be signing up with a host that has PHP installed already and won't have to worry about any of that stuff.What is a PHP File?
PHP files may contain text, HTML tags, and scripts and are returned to the browser as plain HTML and usually have the file extension of ".php". When you need to create a new PHP file it is easier to take a PHP you have and make a copy of it than create a file and rename the extension so here is a blank PHP file for you to download and make copies of. Right click on the icon and click "Save target as".| DOWNLOAD SAMPLE .PHP FILE |
Bookmark this page: |








