Monday, July 5, 2021

How to run a PHP file on Browser using Terminal?

 After You create a PHP file, 

  • Open Terminal
  • Go to the folder contains your PHP file
    • eg: think you created  a folder named PHP on desktop and saved your php file in it. then you as like this.
      • cd Desktop
      • cd PHP --> Your php file contains here. You can check it with "ls' command.
  • Now use this command there.
    • php -S localhost:8888 -t.
      • remember to put a dot after "t"
      • you can use any 4 digits. Not only 8888
  •  Now go to your browser and type this command on the address bar and press Enter.
    • localhost:8888/your_php_file_name_here.php
        •  Your_php_file_name_here --> the name you used to save your php file.

Friday, July 2, 2021

How to install Apache Web browser in XUBUNTU?

Apache web server is a popular web server we can use easily.
  • Open Terminal Emulator you use.
  • Run Update command.
    • sudo apt-get update
  •  Install Apache.
    • sudo apt-get install apache2
  • Start the service.
    • sudo service apache2 start
  • Check whether It's working or not
    • http://localhost/

 Use these command to start, stop and restart.

  • sudo service apache2 start
  • sudo service apache2 restart
  • sudo service apache2 stop

to get status of apache server.

  • sudo service apache2 status

 



How to run a PHP file on Browser using Terminal?

 After You create a PHP file,  Open Terminal Go to the folder contains your PHP file eg: think you created  a folder named PHP on desktop an...