There are installs available for Linux, Windows, Mac OS X and Solaris. The steps below are written for the Windows install.
To start, download XAMPP for Windows. I recommend getting the EXE install. Run the installer and select the installation destination on your PC. I recommend sticking with the C:\ default for simplicity.
After the install is done you can start up Apache and MySQL from the XAMPP Control Panel. If the control panel doesn’t show up right away you can launch it from the Start Menu.
If you have the built in Windows firewall running, it will ask you if you want to unblock Apache and MySQL the first time. Go ahead and click Unblock.
Next open up your favorite browser and navigate to http://localhost/.
If Apache is running correctly you should see a splash screen where you can select your language. After selecting that it will take you to the XAMPP home page below which gives you status information and details about the installed software packages. You can also get to phpMyAdmin from here for working with your MySQL installation.
Now that the Apache web server is running, lets test it out with a simple Hello World example in PHP.
Navigate to the htdocs folder in your XAMPP installation (C:\xampp\htdocs by default). Any web projects you add here will be accessible through the browser.
Create a new folder in C:\xampp\htdocs named hello.
Then create a file in the hello folder called index.php and use your favorite text editor to put this code in it. I like Notepad ++, but Notepad works fine too.
1 2 3 | <?php echo 'Hello world!' ; ?> |
If everything worked correctly your page should load with the classic programming greeting. You now have a basic web development environment to play around in.
Got a question? Leave a comment below.
0 komentar:
Posting Komentar