[英]uncaught syntaxerror; unexpected token <
I get error on chrome console :Uncaught SyntaxError: Unexpected token < 我在chrome console上遇到错误:Uncaught SyntaxError:Unexpected token <
Seems to be about syntax error but I can't find anything wrong. 似乎是关于语法错误,但我找不到任何错误。 it is just sign of beginning php codes but how can it makes syntax error on this case??
它只是开始PHP代码的标志,但它如何在这种情况下使语法错误?
some other codes above
<!--Map below -->
<div id="mgmap"></div><br />
<br />
<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3.exp&language=en®ion=us&key=myGoogleMapKeyHere"></script>
<script src="<?=$board_skin_url?>/markerclusterer.js"
type="text/javascript"></script>
<script type="text/javascript">
var map;
var ymakcur;
var ymakcurOptions = {styles:[{
height: 53,
width: 52,
url: '<?=$board_skin_url?>/img/ymc2.png',
}],gridSize: 20, maxZoom: 17};
var infowindow = new google.maps.InfoWindow();
var geocoder = new google.maps.Geocoder();
var bounds = new google.maps.LatLngBounds();
var ymypoint = '<?php echo $board_skin_url ?>/img/mapicon002.png';
var address = new Array(
<? for ($i=0; $i<count($list); $i++) { <--- **in this line < makes the error**
$ylat=($list[$i][wr_3]);
$ylng=($list[$i][wr_4]);
?>
"<?=$ylat?>,<?=$ylng?>"
<? if ($i==count($list)-1) continue; ?>
,
<? } ?>
);
some other codes below
Using <?
使用
<?
which is a short open tag of PHP, you have to enable it. 这是PHP的一个简短开放标记,你必须启用它。
Set short_open_tag=On
in your php.ini
and restart the server. 在
php.ini
设置short_open_tag=On
并重启服务器。
Of course, using this type of opening tag is not recommended. 当然,不建议使用这种类型的开口标签。 Look at PSDR-1 .
看看PSDR-1 。 In the overview section, the first line.
在概述部分,第一行。
Update your php.ini file. 更新您的php.ini文件。
Search for short_open_tag 搜索short_open_tag
update short_open_tag= on 更新short_open_tag = on
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.