I don't think an introduction to PHP is required by any of you readers. If you have come to this site, then you know PHP or at least you want to learn PHP. So let us get started right away :
To run PHP, you need a server. Why? Because, unlike Javascript, PHP is a server side scripting language. This means that you need a server software on which to run PHP. So what does the PHP software you downloaded do? Basically, it reads and interprets the PHP lines you entered. But surprise : You can also run PHP on command line. You can also develop command line applications with PHP. Just code in PHP and compile it using PHP. So lets get started. First of all download the PHP and Apache binaries.
Apache is available here.
Yes guys, I know its Apache 2.0.59. You may wonder why I didn't choose Apache 2.2 that has already been released. The reason is that no compatible PHP modules for the Apache 2.2 have yet been released as of this writing.
Next, download PHP 5 from here.
Select a suitable mirror and proceed to download. While downloading make sure that you are downloading the zip package and not the installer. There is no need to install softwares unless and until absolutely necessary. It does not affect Linux distros, but in Windows, installing softwares lead to writing unwanted registry entries which are to be avoided.
So that starts your PHP learning class.
Next, you need to setup a directory structure in your hard drive.
Assume that you are using your "D:" drive for learning and setting up PHP. Web pages have directory structures similar to your folder names. The only difference is that they all have forward slashes while your directories have backslashes.
Suppose that you create a directory called "server" in D:\ and you wish to make it your root directory. All you have to do is to create your directory. The configurations are done in the Apache configuration file httpd.conf.
So the directory server will be your root directory. All web pages that you create will be stored here. Its time to begin the installation of Apache. Fire up the Apache installer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment