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

前端 未结 6 863
半阙折子戏
半阙折子戏 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:48

    Pick a name for it lets use hello.php for this example.

    On Ubuntu the folder is /var/www/html, NOT /var/www. You will need root access for that. So you save the file as /var/www/html/hello.php.

    Open up a web browser and enter the following address:

    localhost/hello.php

    And BAM. There's you page.

提交回复
热议问题