Where do I put my Hello world PHP file on Ubuntu?

前端 未结 6 855
半阙折子戏
半阙折子戏 2021-02-13 22:04

So I want to learn PHP, and I\'ve installed it with \"sudo apt-get install php5\" on my Ubuntu 14.04 machine. I see it also installed Apache.

Now I\'ve created my progra

6条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-13 22:54

    In order to make it possible for Apache to see and play with your helloWorld.php or any other file it should be inside /var/www/html/

    But /var/www/html/ requires root privilege to write or create documents here. I.e use sudo in the terminal to open up the editor or simply extend the privilege to write and execute by using chmod command

提交回复
热议问题