我的 PHP 代码被注释掉了 [英] My PHP code is commented out

查看:22
本文介绍了我的 PHP 代码被注释掉了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一切发生之前,我正在运行这个 wordpress 安装来使用 xampp 开发主题.但是我决定将这台机器的内存从 2GB 升级到 6GB,因为我需要额外的应用程序空间.我通过复制它们在一个单独的分区中备份我的代码.由于我当时是32位的操作系统,所以我格式化了电脑,安装了64位的版本.操作系统方面一切正常.

Before everything happened, I was running this wordpress install for developing themes using xampp. But I decided to upgrade the memory of this machine from 2GB to 6GB since I need extra room for applications. I back-up my code in a separate partition by copying them. Since I have a 32bit OS at the time, I format the computer and installed a 64bit version. All is well and fine the OS side.

当我设置 Web 开发环境时出现问题.

When I setup my web dev environment something goes wrong.

当我重新导入 htdoc 时,首先将它们完全复制到新安装的 xampp 中,然后注意到所有输入的代码都不起作用.我的 CI 代码在浏览器中显示我的 PHP 代码.当我查看源代码时,我在 wordpress 中的主题也在注释掉我的 PHP 代码.我新安装的 wordpress 中包含的主题有效,所以我在这里遗漏了一些东西.

When I imported my htdocs back, first by just fully copying them to a new fresh install of xampp and notice that all of the codes that put are not working. My CI code is displaying my PHP code in the browser. My theme in wordpress is also commenting out my PHP code when I view the source. The themes included in my fresh wordpress install works so there's something I am missing here.

从它的外观来看,php 正在正确执行,因为我安装的任何东西都可以工作.只是来自先前 xampp 的那些不是.

From the looks of it, the php is being executed properly since anything that I install works. Just that the ones that came from a previous xampp is not.

推荐答案

打开 php.ini 文件并设置 short_open_tag = On.然后重启apache.

Open up the php.ini file and set short_open_tag = On. Then restart apache.

这篇关于我的 PHP 代码被注释掉了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆