简体   繁体   中英

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. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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