施用html模板获取不到php的变量值
程序员文章站
2023-12-31 12:02:58
...
使用html模板获取不到php的变量值
- PHP code
- 逃离伪PHP软件工程师应该做的事
- php兑现自动获取生成关键词功能
- 这个SQL里的函数是mysql函数还是php函数...
- Oauth2.0开发 为什么子要提交access_...
- 施用html模板获取不到php的变量值
- HTML基础教程之<strong>和<em>
- HTML基础教程之<span>标签
- HTML基础教程之<meta>标签
- HTML <div> 和<span>
- JavaScript数组对象属性length和二维数组
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
- 最新文章
- 热门排行
require_once(dirname(__FILE__)."/../include/common.inc.php"); require_once(DEDEINC.'/arc.partview.class.php'); error_reporting(E_ERROR | E_WARNING | E_PARSE); function get_sub_content($str, $start, $end){ if($start == '' || $end == ''){ return; } $str = explode($start, $str); $str = explode($end, $str[1]); return $str[0]; } include('Snoopy.class.php'); if (!$_GET['hpzl'] || !in_array($_GET['hpzl'],array('01','02'))) { exit(''); } $hpzl = trim($_GET['hpzl']); if (!$_GET['hphm']) { exit(''); } $hphm = strtoupper(trim($_GET['hphm'])); if (!$_GET['tj'] || !in_array($_GET['tj'],array('SYR','SFZMHM','FDJH','CLSBDH'))) { exit(''); } $tj = trim($_GET['tj']); if (!$_GET['tj_val']) { exit(''); } $tj_val = trim($_GET['tj_val']); $tj_val = iconv('gb2312','utf-8',$tj_val); $url = 'http://117.36.53.122:9082/wfcx/query.do?actiontype=vioSurveil&hpzl='.$hpzl.'&hphm='.$hphm.'&tj='.$tj.'&tj_val='.urlencode($tj_val); $snoopy = new Snoopy(); $snoopy->fetch($url); $result = $snoopy->results; $result = str_replace(chr(10),'',$result); $result = str_replace(chr(13),'',$result); $result = str_replace(chr(9),'',$result); $alert = get_sub_content($result,'alert("','");'); if ($alert) { exit(''); } $car = array(); $car['hpzl'] = get_sub_content($result,'号牌种类',' '); $car['hphm'] = get_sub_content($result,'号牌号码',' '); $car['zwpp'] = get_sub_content($result,'中文品牌',' '); $car['clxh'] = get_sub_content($result,'车辆型号',' '); $car['cllx'] = get_sub_content($result,'车辆类型',' '); $car['csys'] = get_sub_content($result,'车身颜色',' '); $car['yxqz'] = get_sub_content($result,'检验有效期止',' '); $car['bfqz'] = get_sub_content($result,'强制报废期止',' '); $car['jdczt'] = get_sub_content($result,'机动车状态',' '); $car['jdsyr'] = get_sub_content($result,'机动车所有人',' '); if(!$car){ exit(''); } $weigui = get_sub_content($result,'信息来源',''); $weigui = explode('',$weigui); $weigui = array_filter($weigui); if ($weigui) { foreach ($weigui as $wg){ $wg = explode('',$wg); $arr['hphm'] = str_replace('','',$wg[0]); $arr['hpzl'] = str_replace(' ','',$wg[1]); $arr['wfsj'] = str_replace(' ','',$wg[2]); $arr['wfdd'] = str_replace(' ','',$wg[3]); $arr['wfxw'] = str_replace(' ','',$wg[4]); $arr['fxjg'] = str_replace(' ','',$wg[5]); $arr['xxly'] = str_replace(' ','',$wg[6]); $car['weigui'][] = $arr; } }else { $car['weigui'] = array(); } //print_r($weigui); //print_r($car); $wg = new PartView(); $wg->SetTemplet($cfg_basedir.$cfg_templets_dir."/default/article_weigui.htm"); $wg->Display();
为什么我在html模板使用显示不出来呢?请各位大侠不吝赐教。相关文章
相关视频
专题推荐
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论