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

前端 未结 6 876
半阙折子戏
半阙折子戏 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 23:05

    I had the same problems, but this solution did not work. When i tried to call my hello.php script via

    ip/hello.php
    

    The error logs from my apache gave this message

    [Fri Jun 26 16:21:27 2015] [:error] [pid +++] [client ip.ip.ip.ip:pppp] script '/var/www/vhosts/default/htdocs/hello.php' not found or unable to stat
    

    When I moved the script from /var/www/html/ to /var/www/vhosts/default/htdocs it worked.

提交回复
热议问题