How do you get started with PHP as a complete newbie?
A common question that I get asked is
How do I get started with PHP?
The following is a simple recipe to get you started with PHP.
You’ll need the following basic ingredients for success:
- A reasonably modern computer running Windows
- A text editor, notepad for example
- A web browser, like Chrome or Firefox
Then follow these instructions to cook up your first “hello world” PHP page:
- Setup a local webserver on your computer, by installing WAMPSERVER – download from here
- Once installed, right click on the WAMPSERVER icon in your Sys Tray and click on “www directory”.
- Create a new folder called “Project1”
- Enter the folder
- Create a new file, called index.php
- Edit the file with your text editor, notepad will do
- Enter the following code into the file, or copy and paste from here:
<?php echo "Hello World!";
- Save the file
- Open your web browser and navigate to this URL: http://localhost/Project1
- You should see a page with the text “Hello World!” displayed in it
- Congratulations you’ve successfully made your first PHP page!