数据库链接错误 : Unknown MySQL server host 'udm426779189.my3w.com' (1)

255.   * @param dir    目录路径
256.   * @param mode    文件权限
257.   */
258.  function __mkdirs($dir$mode 0777)
259.  {
260.      if (!is_dir($dir)) {
261.          __mkdirs(dirname($dir), $mode);
262.          return @mkdir($dir$mode);
263.      }
264.      return true;
265.  }
95.          }
96.          if(null != $sort){
97.              $sort "ORDER BY {$sort}";
98.          }else{
99.              $sort "ORDER BY {$this->pk}";
100.          }
101.          $sql "SELECT {$fields} FROM {$this->tbl_name} {$where} {$sort}";
102.          if(null != $limit)$sql $this->_db->setlimit($sql$limit);
103.          return $this->_db->getArray($sql);
104.      }
105.      /**
255.   * @param dir    目录路径
256.   * @param mode    文件权限
257.   */
258.  function __mkdirs($dir$mode 0777)
259.  {
260.      if (!is_dir($dir)) {
261.          __mkdirs(dirname($dir), $mode);
262.          return @mkdir($dir$mode);
263.      }
264.      return true;
265.  }
1.  <?php set_time_limit(0); class main extends spController {     function __construct() {         parent::__construct ();         $this->webset=spClass("lib_websetting")->find();         $this->pdclassfuji=spClass("lib_pdclass")->findAll('pid=0','orderid asc,id desc');//产品父级分类信息         $this->pdclassziji=spClass("lib_pdclass")->findAll('pid!=0','orderid asc,id desc');//产品子级分类信息         $this->ptindex=spClass("lib_product")->find(array('recommend_index'=>'Y','recycle'=>'N'),"id desc");//首页产品     } /****************************读取信息开始******************************/     function index() { //首页     //    $this->products=spClass("lib_product")->findAll("recycle='N'",'id desc limit 8');//产品信息     //    $this->shouye=spClass("lib_product")->findAll(array('recommend_index'=>'Y','recycle'=>'N'),'id desc limit 20');//推荐到首页         $this->webset=spClass("lib_websetting")->find();//网站设置     } function host() { //焦点图切换         $this->shouye=spClass("lib_product")->findAll(array('recommend_index'=>'Y','recycle'=>'N'),'orderid desc limit 14');//推荐到首页     }     function links() {//友情链接     $this->linksList=spClass("lib_links")->findAll('','id desc limit 100');     }     function webset() {//网站设置     $this->webset=spClass("lib_websetting")->find();     }     function webinfo() {//网站信息设置详细         $this->webinfo=spClass("lib_webinfo")->find(array('id'=>$this->spArgs('id')));     }     function news() {//读取新闻列表         $this->newsList=spClass("lib_company")->spPager($this->spArgs('page',1),20)->findAll(array('classid'=>1),'add_time desc,id desc');         $this->pager=spClass("lib_company")->spPager()->getPager();     }     function news_view() {//读取新闻详细         $this->news=spClass("lib_company")->find(array('id'=>$this->spArgs('id')));     }     function download() {//读取下载列表         $this->download=spClass("lib_company")->findAll(array('classid'=>2),'add_time desc,id desc limit 20');     }     function products() {//产品列表         $this->father=spClass("lib_pdclass")->findAll('pid=0','orderid asc,id desc');//产品父级分类信息         $this->son=spClass("lib_pdclass")->findAll('pid!=0','orderid asc,id desc');//产品子级分类信息         $this->chanpin=spClass("lib_product")->findAll(array('recycle'=>'N'),"id desc");         $this->shangpin=spClass("lib_product")->findAll();     }     function product_list() {//读取产品列表     $where=array(             'cid'=>$this->spArgs('id'),             'recycle'=>'N',             );         $page=$this->spArgs('page')?$this->spArgs('page'):1;         $this->productList=spClass("lib_product")->spPager($page,60)->findAll($where,"orderid desc,id desc");         $this->pager=spClass("lib_product")->spPager()->getPager();         $this->puindex=spClass("lib_product")->find(array('recommend'=>'Y','cid'=>$this->spArgs('id'),'recycle'=>'N'),"orderid desc,id desc");//首页产品         $find=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));         $pid=$find['pid'];         if($pid=='0') {             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));         }else{             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));             $this->ziji=spClass("lib_pdclass")->find(array('id'=>$this->fuji['pid']));         }         $this->shangpin=spClass("lib_product")->findAll();     }     function product_bigclass() {         $find=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));         $select=spClass("lib_pdclass")->findAll(array('pid'=>$this->spArgs('id')));         if(!$select) {             //$this->jump(spUrl("main","product_list",array("id"=>$this->spArgs('id'))));         }         $pid=$find['pid'];         if($pid=='0') {             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));         }else{             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$this->spArgs('id')));             $this->ziji=spClass("lib_pdclass")->find(array('id'=>$this->fuji['pid']));         }         $id=array('pid'=>$this->spArgs('id'));         $this->zifenlei=spClass("lib_pdclass")->findAll($id,"orderid asc,id desc");         $this->shangpin=spClass("lib_product")->findAll("recycle='N'","orderid desc,id desc"); if($select) {         $this->chanpin=spClass("lib_product")->findAll("recycle='N'","orderid desc,id desc"); }else{         $where=array('cid'=>$this->spArgs('id'),'recycle'=>'N',);         $page=$this->spArgs('page')?$this->spArgs('page'):1;         $this->productList=spClass("lib_product")->spPager($page,60)->findAll($where,"orderid desc,id desc");         $this->display("main/product_list.html"); }     }     function product_view() {//产品详细     $this->product=spClass("lib_product")->find(array('id'=>$this->spArgs("id")));     $cid=$this->product['cid'];         $this->jiname=spClass("lib_pdclass")->find(array('id'=>$cid));         if($this->jiname['pid']=='0') {             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$cid));         }else{             $this->fuji=spClass("lib_pdclass")->find(array('id'=>$cid));             $this->ziji=spClass("lib_pdclass")->find(array('id'=>$this->fuji['pid']));         }         $fristimg=$this->product['picture'];         $this->frist=substr_replace($fristimg,'_z',-4,0);         $where=array(             'id'=>$this->spArgs('id'),             'recycle'=>'Y',             );         $find=spClass("lib_product")->find($where);         $cid=$this->product['cid'];         if($find) { $this->success('产品已经被删除,请点击返回',spUrl('main','products'));}             $id=$this->spArgs('id');             $sql="SELECT * FROM `wyc_product` WHERE cid=".$cid." and id!=".$id." and recycle='N' order by orderid desc limit 50";             $array=$this->qtproduct=spClass("lib_product")->findSql($sql);//未发送???????             $this->shangpin=spClass("lib_product")->findAll();     }     function email() {//邮件信息入库         $args=$this->spArgs();         $args['crtime']=$_SERVER['REQUEST_TIME'];         $insert=spClass("lib_email")->create($args);         if($insert) { $this->success('发送成功!');}else{ $this->error('发送失败!');}     }     function search() {         $this->keywords=$keywords=$this->spArgs('keywords');         if($keywords=='') {             $this->jump(spUrl("main","index"));         }else{         $this->searchList=spClass("lib_product")->spPager($this->spArgs('page',1),60)->findAll("(name LIKE '%".$keywords."%' OR description LIKE '%".$keywords."%' OR remark LIKE '%".$keywords."%' OR keywords LIKE '%".$keywords."%') and recycle='N'","orderid asc,id desc");         $this->pager=spClass("lib_product")->spPager()->getPager();         }     } /****************************读取信息结束******************************/ } ?>
255.   * @param dir    目录路径
256.   * @param mode    文件权限
257.   */
258.  function __mkdirs($dir$mode 0777)
259.  {
260.      if (!is_dir($dir)) {
261.          __mkdirs(dirname($dir), $mode);
262.          return @mkdir($dir$mode);
263.      }
264.      return true;
265.  }
17.          eval($GLOBALS['G_SP']["dispatcher_error"]);
18.          exit;
19.      }
20.      // 路由并执行用户代码
21.      $handle_controller->$__action();
22.      // 控制器程序运行完毕,进行模板的自动输出
23.      if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
24.          $__tplname $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
25.                  $__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
26.          $handle_controller->auto_display($__tplname);
27.      }
63.  );
64. 
65.  require(SP_PATH."/SpeedPHP.php");
66.  import(APP_PATH.'/model/function.php');
67. 
68.  spRun(); // 新加入的spRun函数调用!