$ming2arr = $this->qm_kangxi->find_fetch(array('hanzi'=>$ming2), array('id' => 1), 0, 1); if($ming2arr){ $ming2arr = current($ming2arr); $v['ming2_wuxing'] = $ming2arr['wuxing']; $v['ming2_yisi'] = $ming2arr['yisi'] ? $ming2arr['yisi'] : '美好'; $v['ming2_yuyi'] = $ming2arr['yuyi'] ? $ming2arr['yuyi'] : '吉祥如意'; $v['ming2_jieshi'] = $ming2arr['jieshi'] ? $ming2arr['jieshi'] : '出自诗词'; }else{ $v['ming2_wuxing'] = '木'; $v['ming2_yisi'] = '美好'; $v['ming2_yuyi'] = '吉祥如意'; $v['ming2_jieshi'] = '出自诗词'; } } $v['xing_wuxing'] = $_show['xing_wuxing']; } $_show['list'] = $list_arr; $this->assign('cfg', $this->_cfg); $this->assign('cfg_var', $this->_var); $GLOBALS['_show'] = &$_show; $GLOBALS['run'] = &$this; $_ENV['_theme'] = &$this->_cfg['theme']; $this->display($tpl); }else{ // 正常格式:具体的名字 - 使用 mingzi_show.htm 模板 //名 不能大于2个字 if(_strlen($_GET['ming']) > 2){ core::error404(); } $_show = $this->qm_xing->find_fetch(array('xing'=>$_GET['xing']), array(), 0, 1); if( empty($_show) ) core::error404(); $_show = current($_show); $_show['xingming'] = $_GET['xing'].$_GET['ming']; $_show['ming'] = $_GET['ming']; $times_data = $this->qm_xingming_times->xingming_times($_show['xingming']); $_show['dateline'] = isset($times_data['dateline']) ? $times_data['dateline'] : $_ENV['_time']; $_show['lasttime'] = isset($times_data['lasttime']) ? $times_data['lasttime'] : $_ENV['_time']; $_show['date'] = date('Y-m-d H:i',$_show['dateline']); if(isset($this->_cfg['url_path']) && !empty($this->_cfg['url_path'])) { $_show['absolute_url'] = $this->_cfg['webroot'].$this->urls->qm_ming_url($_GET['xing'], $_GET['ming']); }else{ $_show['absolute_url'] = $this->urls->qm_ming_url($_GET['xing'], $_GET['ming']); } $_show['pic'] = $this->_cfg['weburl'].'mingzi/pic/'.urlencode($_show['xingming']).'.jpg'; $this->_var['topcid'] = $this->_baijiaxing_cid; // SEO 相关 $this->_cfg['titles'] = "{$_show['xingming']}名字打分-{$_show['xingming']}名字的含义解析-{$this->_cfg['webname']}"; $this->_cfg['seo_keywords'] = "{$_show['xingming']}名字的含义,{$_show['xingming']}名字打分,{$_show['xingming']}名字解析,{$_show['xingming']}名字怎么样,{$_show['xingming']}名字好不好"; $this->_cfg['seo_description'] = "{$this->_cfg['webname']}提供{$_show['xingming']}名字打分评分解析,专业的深度解析{$_show['xingming']}名字的含义,让您更加了解这个{$_show['xingming']}名字背后所包含的深刻含义。"; $this->assign('cfg', $this->_cfg); $this->assign('cfg_var', $this->_var); $GLOBALS['_show'] = &$_show; $GLOBALS['run'] = &$this; $_ENV['_theme'] = &$this->_cfg['theme']; $tpl = 'mingzi_show.htm'; $this->display($tpl); } } public function mingzipic(){ $_GET['xingming'] = urldecode($_GET['xingming']); if( empty($_GET['xingming']) || _strlen($_GET['xingming']) > 4 ){ exit(); } if (isset($_SERVER['http_IF_MODIFIED_SINCE'])) { header('Last-Modified: '.$_SERVER['HTTP_IF_MODIFIED_SINCE'],true,304); exit(); } $title = $_GET['xingming']; $font = PLUGIN_PATH."le_quming_pro/static/MSYH.otf"; //字体,需要使用微软雅黑 宋体等常见字体 $backgroundPath = PLUGIN_PATH."le_quming_pro/static/bg.jpg"; $size = 36; //默认字体大小 //创建图片 $img = imagecreatefromjpeg($backgroundPath); $width = imagesx($img); $height = imagesy($img); $a = imagettfbbox($size, 0, $font, $title); //得到字符串虚拟方框四个点的坐标 $len = $a[2] - $a[0]; $x = ($width-$len)/2; $h = $size/10; $y = ($height/2)+10+$h; $color = imagecolorallocate($img, 255, 255, 255); // 0 0 0 表示黑色 $cache_day = '30 day'; //缓存天数 //将规定当前页面缓存的时间(两天),并在下一次访问中使用这个缓存时间节点。接下来判断是否已经有缓存,如果有,就使用缓存。 header("Cache-Control: private, max-age=10800, pre-check=10800"); header("Pragma: private"); header("Expires: " . date(DATE_RFC822, strtotime($cache_day))); header("Content-type:image/jpeg"); imagettftext($img, $size, 0, $x, $y, $color, $font, $title); imagejpeg($img); imagedestroy($img); exit(); } //康熙字典详情页 public function kangxizidian(){ $_GET['id'] = (int)R('id'); if( empty($_GET['id']) ) core::error404(); $_show = $this->qm_kangxi->get($_GET['id']); if( empty($_show) ) core::error404(); $this->_var['topcid'] = $this->_zidian_cid; // SEO 相关 $this->_cfg['titles'] = $_show['hanzi'].'字解释-'.$_show['hanzi'].'字五行属性-'.$this->_cfg['webname']; $this->_cfg['seo_keywords'] = $_show['hanzi'].'字解释,'.$_show['hanzi'].'字五行属性'; $this->_cfg['seo_description'] = $_show['hanzi'].'字解释:'.$_show['yuyi']; $this->assign('cfg', $this->_cfg); $this->assign('cfg_var', $this->_var); $GLOBALS['_show'] = &$_show; $GLOBALS['run'] = &$this; $_ENV['_theme'] = &$this->_cfg['theme']; $tpl = 'kangxizidian_show.htm'; $this->display($tpl); } //康熙字典解字 public function jieword(){ $word = R('word', 'P'); if($word){ $word = urldecode($word); $arr = $this->qm_kangxi->find_fetch(array('hanzi'=>$word), array(), 0, 1); if(!$arr){ E(1, '暂无此字'); }else{ $arr = current($arr); $url = $this->urls->kangxi_url($arr['id']); E(0, 'OK', '', array('url'=>$url)); } }else{ E(1, '请填写查询的汉字'); } } // public function bjx_post(){ // $xing = trim(R('xing', 'P')); // if(empty($xing)){ // exit('姓不能为空'); // } // // if($this->qm_bjx->find_fetch_key(array('xing'=> $xing))){ // exit('姓已经存在'); // } // $id = $this->qm_bjx->create(array('xing'=>$xing)); // if($id){ // exit('发布成功'); // }else{ // exit('写入数据表失败'); // } // } // // public function kx_post(){ // $hanzi = trim(R('hanzi', 'P')); // if(empty($hanzi)){ // exit('字不能为空'); // } // // if($this->qm_kangxi->find_fetch_key(array('hanzi'=> $hanzi))){ // exit('字已经存在'); // } // // $post = $_POST; // if(isset($post['pinyin']) && $post['pinyin'] == '[db:拼音]') $post['pinyin'] = ''; // if(isset($post['bihua']) && $post['bihua'] == '[db:康熙笔画]') $post['bihua'] = 0; // if(isset($post['jianbihua']) && $post['jianbihua'] == '[db:笔画]') $post['jianbihua'] = 0; // if(isset($post['bushou']) && $post['bushou'] == '[db:部首]') $post['bushou'] = ''; // if(isset($post['wuxing']) && $post['wuxing'] == '[db:五行]') $post['wuxing'] = ''; // if(isset($post['fanti']) && $post['fanti'] == '[db:繁体字]') $post['fanti'] = ''; // // empty($post['fanti']) && $post['fanti'] = $hanzi; // Lecms 3.0.3 错误

错误信息

错误位置

基本信息

程序流程

SQL

$_GET

$_POST

$_COOKIE

包含文件

其他信息