Course Content
About Lesson

Installing PHP (Options):

We can use php language using Multiple Options:

  • Install XAMPP.
  • In the XAMPP Control Panel, start Apache.
  • The project folder is located at: XAMPP/htdocs/
  • Inside the htdocs folder, create a new folder named php-basics/ and place your project files inside it.
  • Example: C:/xampp/htdocs/php-basics/hello.php
  • Install WAMP → Start Apache.
  • Project folder: C:\wamp64\www\php-basics\
  • Install Laragon → Start Apache/Nginx.
  • Project folder: C:\laragon\www\php-basics\
  • Browser: http://localhost/php-basics/
  • (Laragon can also create an auto virtual host, e.g. http://php-basics.test)
  • Install PHP
    Windows: download zip/exe
    Mac: use Homebrew
    Linux: use package manager (apt, yum, etc.)
  • Check installation in terminal:
    php -v
  • Go to your project folder and run:
    php -S localhost:8000
  • Open in browser:
    http://localhost:8000