简体   繁体   English

PHP文件不输出到本地浏览器,只显示代码

[英]PHP file isn't outputing to local browser, just showing code

Originally, I would select my php files and it would open the site on my local browser, I accidently opened it to notepad and now it will only open the code to editors.最初,我会选择我的 php 文件,它会在我的本地浏览器上打开网站,我不小心将它打开到记事本,现在它只会向编辑器打开代码。 Does anyone know how to change the file setting back to when it would execute in the local browser?有谁知道如何将文件设置更改回在本地浏览器中执行的时间? Ive tried resetting the filetype associations and resetting the file extension settings in the registry editor.我尝试在注册表编辑器中重置文件类型关联并重置文件扩展名设置。 I am currently using Windows 11我目前使用的是 Windows 11

如果您没有使用 wamp 或 xampp 之类的 servlet,则无法在 localhost 上处理 php 文件。只要文件具有 php 扩展名并且位于 servlet 的目标文件夹中,而 servlet 处于活动状态(例如:如果有wamp 中 www 文件夹中的 index.php。如果您在浏览器中键入 localhost/index.php,它将起作用。)您的 php 文件将起作用。

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

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