懒一点的话,就只在FTP.PHP文件中加入 ftp_pasv($this->conn,true); 吧!修改 appimportexportlibpolicytp.php 文件
public function __construct(){
$this->ftp_server = app::get('importexport')->getConf('ftp_server_setting');
if(!$this->conn){
$this->ftp_server['port'] = $this->ftp_server['port'] ? $this->ftp_server['port'] : 21;
$this->conn = ftp_connect($this->ftp_server['host'],$this->ftp_server['port']);
$this->bb=ftp_login($this->conn,$this->ftp_server['name'],$this->ftp_server['pass']);
}
if($this->ftp_server['pasv']=='true'){
ftp_pasv($this->conn,$this->ftp_server['pasv']); //vmax 开启被动模式
}
$this->cd($this->ftp_server['dir']);
}
修改 appimportexportiewadmintp.html
<p style='margin:20px 0'><{t}>被动模式(PASV):<{/t}>
<input type='radio' name='pasv' value='true' <{if $ftp_server.pasv=='true'}>checked <{/if}>>开启
<input type='radio' name='pasv' value='false' <{if $ftp_server.pasv=='false'}>checked <{/if}>>关闭
</p>
- 841 cd lanmp/lanmp/php-5.3.27/ext/ftp
- 846 phpize
- 847 ./configure -with-php-config=/www/wdlinux/php/bin/php-config
- 848 make
- 849 make install
- 850 ll /www/wdlinux/apache_php-5.3.27/lib/php/extensions/no-debug-non-zts-20090626/
- 851 vim /www/wdlinux/etc/php.ini
- 852 service httpd restart
新闻热点
疑难解答