【求助】linux下解析模板多了反斜线,这是啥情况啊
thinkphp吧
全部回复
仅看楼主
level 1
杨鯤 楼主
服务器是linux,php5.3
这是服务器解析后的模板
只要是php代码,有引号的的都加了反斜线。
有碰到这问题的吗,传授一下解决方法啊
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php if(is_array($location)): foreach($location as $key=>$diy): echo ($diy[\\"title\\"]); ?>_<?php endforeach; endif; echo F(\"head/title\");?></title>
<meta name="keywords" content="<?php echo $keywords?$keywords:F(\"head/keywords\");?>" /> <meta name="description" content="<?php echo $description?$description:F(\"head/description\");?>" /> <link href="/css/bootstrap.css" rel='stylesheet' type='text/css' /> <!-- Custom Theme files --> <link href="/css/style.css" rel='stylesheet' type='text/css' /> <!-- Custom Theme files --> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="/js/jquery.min.js" type="text/javascript"></script>
<script src="/js/artDialog/artDialog.source.js?skin=simple">//样式</script>
<script src="/js/plugins/iframeTools.source.js">//iframe</script>
</head>
<body>
<!----- start-header---->
<div class="wrapper">
<!----start-header---->
<div class="header">
<div class="container header_top">
<div class="login">
<ul class="login_left">
<li><!--所在地:<a href="#">全国</a>--></li>
</ul>
<ul class="login_right">
<li><?php echo W(\"User\");?></li>
</ul>
</div>
<div class="logo">
<a href="/"><img src="/images/logo.png" alt=""></a>
</div>
<div class="menu">
<a class="toggleMenu" href=" <ul class="nav" id="nav"> <li class="current"><a href="/">首页</a></li> <li><a href="<?php echo U(\"/Index/Personal/salesList/\");?>">找销售</a></li> <li><a href="<?php echo U(\"/Index/Group/groupList/\");?>">找产品</a></li> <div class="clearfix"></div> </ul> <script type="text/javascript" src="/js/responsive-nav.js"></script>
</div>
<div class="clearfix"> </div>
<!----//End-top-nav---->
</div>
</div>
<!----- //End-header---->
2014年12月17日 03点12分 1
level 1
杨鯤 楼主
我在服务器用file_get_content获取一个其他网站的网页,然后写入文本,这种情况下引号没有被加反斜线。
猜想应该是thinkphp的问题,但是咱我本地却完全正常,这也没法排除服务器有啥特殊配置。第一次用linux服务器,求高人帮助。
2014年12月17日 03点12分 2
level 6
php里有个设置magic_quotes_gpc,开启会自动转义“,不过从php5.4.0版本起被移除,所以应该是你服务器php版本过低
2014年12月17日 14点12分 3
1