和文件上传媒区别:我的一个函数
function postfile($localfile,$remotefile)
{
$buffer=filesize($localfile);
$fileopen_id = fopen($localfile, "r");
if(!$fileopen_id)return false;
$fileput_id=fopen($remotefile, "w");
if(!$fileput_id)return false;
$fcontents=fread($fileopen_id,$buffer); $filewrite=fwrite($fileput_id,$fcontents);
fclose($fileopen_id);
fclose($fileput_id);
return $buffer;
}
function postfile($localfile,$remotefile)
{
$buffer=filesize($localfile);
$fileopen_id = fopen($localfile, "r");
if(!$fileopen_id)return false;
$fileput_id=fopen($remotefile, "w");
if(!$fileput_id)return false;
$fcontents=fread($fileopen_id,$buffer); $filewrite=fwrite($fileput_id,$fcontents);
fclose($fileopen_id);
fclose($fileput_id);
return $buffer;
}
解决方案 »
- 请问php5.4.7和php5.3.17有什么区别
- php 生成图片
- access for user root@localhost using password: yes
- 得到来路url的方法和蜘蛛抓取记录的方法
- IE弹出对话框“安全信息:本页不但包含安全的内容,也包含不安全的内容。是否显示不安全的内容”
- 函数调用问题
- php中传递的"号如何不变成、\"?
- Excel 文檔轉換為MySQL文檔!!!
- 学习PHP以来一直对类和对象的概念和使用比较模糊,请大家进来谈谈心得和体会。进者有分
- HTTP 错误 500.0 - Internal Server Error
- 谁有win98下能执行*.mis文件的补丁?就是在98下安装apache1.3.20时不能用*.ims的哪个补丁?
- 哪儿有较好的留言板下载?
$userfile_size文件大小
$userfile_type文件mime类型
所有变量系统自动产生