发生了一件非常奇怪的事情,因此在我的测试环境中,我可以打印数据库的某些信息,例如下面的图像,
但是在生产环境中,我得到了以下结果,
在我看来,我有相同的代码,
<div class="dashboard-title" onclick="window.location ='/getnews'">
<i class="fi-list-number"></i> Últimas notícias
</div>
<div id="messages-results" class="hover responsive"
style="margin-top: 20px;">
@if (isset($news) && count($news) > 0)
@foreach ($news as $key=>$n)
<div class="message-list">
<div style="overflow: hidden; height: 20px;" onclick="mark('{{$n->Code}}','{{$n->Title}}')" >
<div class="message-date left">{{ Utils::TranslateDate($n->RegistedDate, 'd M') }}</div>
<div class="message-subject right"><a href={{$n->FileURL}} target="_blank">{{ $n->Title }} </a></div>
</div>
</div>
@endforeach
@else
<div class="message-empty">Não existem notícias</div>
@endif
</div>
<script type="text/javascript">
function mark(code, title) {
$.ajax({
data: {code: code, title: title},
url: 'news/mark',
success: function(data) {
console.log('sucesso');
}
});
}
</script>
我的$ news有结果,我不知道发生了什么...
PS:我的产品系统是centos 7系统