PHP文件不会在浏览器中打开-只能下载.我需要进行哪些更改才能使其正常运行? [英] PHP Files won't open in browser - only download. What do I need to change to make it work properly?
问题描述
我尝试重新安装PHP.PHP正在运行,Apache2正在运行.我不知道为什么它无法在浏览器中打开并正常显示.
I have tried reinstalling PHP. PHP is working, and Apache2 is running. I don't know why it's not opening in a browser and displaying normally.
就这么知道-我的httpd.conf为空-而我的所有内容都在apache2.conf中.这是因为我正在使用Ubuntu.
Just so you know - my httpd.conf is empty - and instead I have everything in apache2.conf. This is because I'm using Ubuntu.
你能帮我吗?我知道这很简单,但是似乎找不到答案.
Can you help me? I know it's something simple, but I can't seem to find the answer.
推荐答案
您在此项目上拥有虚拟主机了吗?
Have you virtual host on this project?
您是使用 http://localhost/file.php 或直接类似于file://来打开php文件吗?...../file.php?
Are you open php file with http://localhost/file.php or directly like file://...../file.php ?
这篇关于PHP文件不会在浏览器中打开-只能下载.我需要进行哪些更改才能使其正常运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!