本帖最后由 火狼王子 于 2015-10-4 16:59 编辑  
 
刚才在应用中心传了个天气预报小插件,好不容易通过审核,在修改文件过程,load.inc.php 不小心多了个空格,导致不正常显示,刚上传的应用又不能马上上传更新文件,只好在这里发个帖了, 如果有下载的 可以自行修改一下 
- <?php
 
  
- !defined('IN_DISCUZ') && exit('Access Denied');
 
  
- new dx_wload;
 
  
- class dx_wload
 
 - {
 
 -         function dx_wload(){
 
 -                 $referer = parse_url($_SERVER['HTTP_REFERER']);
 
 -                 $serverhost = $_SERVER['HTTP_HOST'];
 
 -                 if(($pos = strpos($serverhost, ':')) !== false){
 
 -                         $serverhost = substr($serverhost, 0, $pos);
 
 -                 }
 
 -                 if($referer['host'] != $serverhost) return;
 
  
-                 $clientip = getglobal('clientip');
 
  
-                 if(getgpc('city','g')){
 
 -                         $pluginurl = 'http://i.tianqi.com/index.php?c=code&id=19&icon=1&py='.getgpc('city','g').'&temp=1&num=7&time='.time();
 
 -                 }else{
 
 -                         $pluginurl = 'http://i.tianqi.com/index.php?c=code&id=1&icon=4&wind=1&num=1&time='.time();
 
 -                         if(trim($settings['weather']['city'])){
 
 -                                 if(preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.([0-9]{1,3}|\*)/', $settings['weather']['city'])){
 
 -                                         $clientip = <strong><font color="red">str_repl ace</font></strong>('*', random(3, 1), $settings['weather']['city']);
 
 -                                 }else{
 
 -                                         $pluginurl .= '&py='.$settings['weather']['city'];
 
 -                                 }
 
 -                         }
 
 -                 }
 
  复制代码 就是代码25行位置str_repl ace 多了一个空格, 把它改成 str_replace 
 
 |