简体   繁体   English

npm实时服务器未读取php文件

[英]npm live-server not reading php files

I'm very new to Git, and I just installed live server and I run it via terminal. 我是Git的新手,我刚刚安装了实时服务器,并通过终端运行它。 I noticed that it only runs .html files rather than .php files. 我注意到它只运行.html文件,而不是.php文件。 It basically skips reading them so instead of running index.php, it gives me a directory listing. 它基本上跳过读取它们,因此它没有显示index.php,而是提供了一个目录清单。 If I use an html file, it works fine. 如果我使用html文件,则可以正常工作。 Is there any work around to this? 有什么解决办法吗?

There is no. 没有 This server works only with HTML, CSS and JavaScript. 该服务器仅适用于HTML,CSS和JavaScript。

If you want PHP you need more powerful server (Apache, nginx, lighttpd, etc.) 如果您想要PHP,则需要功能更强大的服务器(Apache,nginx,lighttpd等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM