[英]codeigniter works on live site but not localhost
I copied my live Codeigniter project to my local machine to make development a little easier, but it's not displaying right. 我将当前的Codeigniter项目复制到了本地计算机上,以使开发工作更轻松一些,但是显示不正确。 NO changes have been made, so I am not sure why this is happening?
没有进行任何更改,所以我不确定为什么会这样吗? It almost acts like it cant read from the database, but the listings on the bottom come from a select query so I feel like thats not the case..
它几乎就像无法从数据库中读取一样,但是底部的列表来自选择查询,所以我觉得不是这样。
I am using Windows 10 IIS with PHP. 我正在使用Windows 10 IIS和PHP。
Live site: http://beta.btcbidder.com/ 直播网站: http : //beta.btcbidder.com/
There may be something wrong with your php tags because of the raw output in your image above. 由于上面图像中的原始输出,您的php标记可能存在问题。 This could be down to the use of shorthand php tags which are generally considered bad practice.
这可能归因于速记php标签的使用,通常认为这是不好的做法。
<? ?> & <?= ?>
Shorthand php tags are disabled on some server configurations so for this reason it is best to use a templating engine or at least use the full php markup. 速记php标记在某些服务器配置上被禁用,因此出于这个原因,最好使用模板引擎或至少使用完整的php标记。
Do a find and replace and replace all <? ... ?>
查找并替换并替换所有
<? ... ?>
<? ... ?>
or <?= ?>
tags with the full php tags <?php ... ?>
<? ... ?>
或<?= ?>
标记以及完整的php标记<?php ... ?>
You can also use .htaccess for the same 您也可以使用.htaccess
<IfModule mod_php5.c>
php_value short_open_tag 1
</IfModule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.