<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
function callback(data){
console.log(data);
}
</script>
<script type="text/javascript" src="jsonp.php?_jsonp=callback"></script>
</body>
</html>
jsonp.php
<?
$callback=$_GET['_jsonp'];
$arry=array("zhangsan","lisi","wangwu");
echo $callback."(".json_encode($arry).")";
?>