欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

帮看一上,在中文名和有空格的文件名的不能上载,另外重命名要是中文是乱码

程序员文章站 2022-05-21 16:29:23
...
帮看一下,在中文名和有空格的文件名的不能下载,另外重命名要是中文是乱码
本帖最后由 lfcyk 于 2013-01-22 22:41:49 编辑 /**
* 下载远程文件类支持断点续传
*/
class HttpDownload {
private $m_url = "";
private $m_urlpath = "";
private $m_scheme = "http";
private $m_host = "";
private $m_port = "80";
private $m_user = "";
private $m_pass = "";
private $m_path = "/";
private $m_query = "";
private $m_fp = "";
private $m_error = "";
private $m_httphead = "" ;
private $m_html = "";

/**
* 初始化
*/
public function PrivateInit($url){
$urls = "";
$urls = @parse_url($url);
$this->m_url = $url;
if(is_array($urls)) {
$this->m_host = $urls["host"];
if(!empty($urls["scheme"])) $this->m_scheme = $urls["scheme"];
if(!empty($urls["user"])) $this->m_user = $urls["user"];
if(!empty($urls["pass"])) $this->m_pass = $urls["pass"];
if(!empty($urls["port"])) $this->m_port = $urls["port"];
if(!empty($urls["path"])) $this->m_path = $urls["path"];
$this->m_urlpath = $this->m_path;
if(!empty($urls["query"])) {
$this->m_query = $urls["query"];
$this->m_urlpath .= "?".$this->m_query;
}
}
帮看一上,在中文名和有空格的文件名的不能上载,另外重命名要是中文是乱码

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • 帮看一上,在中文名和有空格的文件名的不能上载,另外重命名要是中文是乱码
  • 专题推荐