lasix cheap
where diflucan
get zithromax
lasix online
diflucan buy
diflucan online
lasix prescription
get zithromax
lasix prescription
order zithromax
lasix canada
cheap diflucan
get diflucan
purchase diflucan
diflucan uk
diflucan online
purchase lasix
order zithromax
diflucan buy
where zithromax
buy diflucan
lasix no rx
order diflucan
cheap zithromax
where diflucan
cheap lasix
where diflucan
cheap lasix
purchase diflucan
buy diflucan
order diflucan
diflucan prescription
get diflucan
order lasix
get lasix
where lasix
cheap diflucan
order lasix
where zithromax
zithromax uk
order diflucan
get zithromax
purchase zithromax
order zithromax
zithromax online
purchase zithromax
get lasix
zithromax uk
purchase zithromax
lasix cheap
zithromax prescription
purchase lasix
order diflucan
purchase lasix
get diflucan
purchase lasix
zithromax no rx
buy zithromax
diflucan no prescription
zithromax cheap
purchase zithromax
lasix no prescription

cheap lasix
zithromax online
buy zithromax
diflucan uk
buy lasix
purchase lasix
zithromax online
diflucan no rx
cheap lasix
buy zithromax
buy lasix
lasix uk
zithromax online
get diflucan
cheap lasix
zithromax no prescription
get lasix
buy lasix
purchase diflucan
where zithromax
get diflucan
get diflucan
cheap zithromax
order zithromax
purchase lasix
get lasix
diflucan prescription
buy diflucan
zithromax no rx
get zithromax
diflucan online
lasix online
diflucan uk
cheap diflucan
diflucan canada
where zithromax
order zithromax
purchase zithromax
get diflucan
get lasix

get zithromax
cheap lasix
get lasix
zithromax prescription
buy zithromax
purchase zithromax
zithromax prescription
cheap lasix
order diflucan
buy zithromax
lasix buy
lasix canada
lasix prescription
lasix no rx
diflucan online
diflucan buy
lasix online
buy diflucan

UGiA PHP UPLOADER V0.2 发布

upu

由于upu0.2x完成度极低且bug众多,请各位选择其他的上传方式,不推荐大家继续使用。

10/15更新:提供两个demo:
V0.2: http://www.ugia.cn/upload_private_v0.2/demo.htm
V0.3: http://www.ugia.cn/upload_private_v0.3/demo.htm

09/22更新:发布upuv0.21,增加多语言支持,修改协议由GPL到LGPL。http://sourceforge.net/projects/upu 下载。或者本地下载

不好意思让大家久等了, 这个版本完成度很低,不过基本可以使用了,所以发出来让大家测试.
由于服务器空间比较紧张,所以没有在线demo, 大家可以查看下面的截图。希望有条件的同学提供一个放demo的空间。

UPU V0.2功能列表
- 理论上可以上传无限大的文件
- 实时显示上传状态、进度
- 支持多文件上传以及与表单混合上传
- 方便的用户调用接口
- 兼容不同浏览器
- …


调用方法:
1.下载upub0.2.rar, 将里面的upu目录解压到网站某一目录下。将upu/temp/, upu/files的目录权限改为755
2.打开upu/misc/upu.js, 修改var basePath = "/upload/upu/"; 为upu相对于网站根目录的路径
3.在包含上传表单的页面中加入<script type="text/javascript" src="upu/misc/upu.js"></script>,这里的upu/misc/upu.js为upu.js的路径,然后在<form>标签中加入onsubmit="return upuInit(this)"
4.在你文件上传后处理的页面中使用$_POST来获取表单数据

注意:
1. UPU需要php4.3.0及其以上版本,并打开socket扩展,因为上传过程中需要开临时端口,请注意一下服务器的防火墙设置。
2. upu/temp为上传临时文件存放目录, upu/files为文件存放目录,这两个目录可以在upu.class.php中指定。
3. 你的<form>中要有enctype="multipart/form-data"这个属性,action为文件上传成功后的处理页面,也就是说你的<form>完全按照正常的思路来写就可以了,唯一不同的是需要加入onsubmit="return upuInit(this)"
4. 上传成功后,可以使用$_POST来获取表单数据,如果是普通表单,直接$_POST['表单名称']即可获得其值,如果是一个文件,则返回这样一个数组
$_POST['表单名字'] = Array (
[filename] => 文件名
[clientpath] => 客户端文件路径
[savepath] => 上传后文件保存路径及文件名
[filetype] => 文件类型
[filesize] => 文件大小
[extension] => 扩展名
)

5. 本程序为自由软件;您可依据自由软件基金会所发表的GNU通用公共授权条款规定,就本程序再为发布与/或修改.本程序是基于使用目的而加以发布,然而不负任何担保责任;亦无对适售性或特定目的适用性所为的默示性担保。详情请参照GNU通用公共授权。http://gnu.freehostingguru.com/gpl/

下载地址:UGiA PHP UPLOADER V0.2

截图:

sh4

171 Comments »

  1. lifesinger said,

    September 13, 2005 @ 12:04 am

    good
    thx a lot!

  2. lifesinger said,

    September 13, 2005 @ 12:21 am

    提供一个demo:

    http://159.226.36.218/mytest/upu_demo.htm

    好像有问题,停在初始化上传不上去,不知道是什么原因

  3. legend said,

    September 13, 2005 @ 12:29 am

    可能是防火墙的原因

    ps: 你的网站链接一直没加是因为你只提供了ip地址,而没有域名。岁月如歌有域名吗?

  4. andot said,

    September 13, 2005 @ 7:58 am

    向虚拟主机这样的服务器,一般都是只开80端口,其他端口都给关闭了。像这样的情况该如何处理?

  5. lifesinger said,

    September 13, 2005 @ 8:36 am

    有域名:http://lifesinger.3322.org/myblog

    关掉防火墙还是不行,停止在初始化上不上传。是不是因为只开了80端口的原因?

  6. LFLY said,

    September 13, 2005 @ 9:24 am

    失败啊。你把地址栏给抹掉但是标题栏还是有。。。。我晕~~:)

  7. legend said,

    September 13, 2005 @ 9:34 am

    你再上传个文件,然后看temp目录最新的一个dat文件内容
    看里面是否有东西,如果没有则证明客户端无法连接socket服务器

  8. superspice said,

    September 13, 2005 @ 1:32 pm

    测试了再来。

  9. lifesinger said,

    September 13, 2005 @ 8:45 pm

    dat文件里没有东西
    暂时不弄了,以后再琢磨

  10. irco said,

    September 13, 2005 @ 9:43 pm

    谢谢共享的代码!!!
    我试用了一下,确实一直停止在初始化上不上传,等会研究一下代码

  11. legend said,

    September 13, 2005 @ 9:52 pm

    一直停止在初始化上传不上去的主要原因是服务器防火墙不允许用户连接upu开的临时端口

    我在以后的版本中会加入log和错误处理

  12. andot said,

    September 14, 2005 @ 11:00 am

    你在以后版本中争取改成监听80端口吧。

  13. Phzzy said,

    September 14, 2005 @ 6:01 pm

    NB的东西..
    期待正式版

  14. millsguo said,

    September 15, 2005 @ 11:39 pm

    修复上传时取消上传不中断BUG:
    function cancel()
    {
    document.getElementById(“frmUpload”).src = “about:blank”;
    document.getElementById(“clientForm”).src = “about:blank”; //增加这句
    }

    测试地址:http://www.kms.net.cn/demo.htm

  15. legend said,

    September 16, 2005 @ 3:58 am

    楼上的, clientForm是一个变量, 而不是一个Element
    所以你加的这句没有用处,而且有错误。至于点取消上传不中断,我这里没有发现这个问题。

  16. feitiger said,

    September 19, 2005 @ 3:06 pm

    的确很奇怪,测试你这个也是停留在“请稍候…”得不到数据,防火墙也关了
    winxp+apache2+php4.3.0
    http://www.kms.net.cn/demo.htm
    他这个竟然可以

  17. legend said,

    September 19, 2005 @ 3:23 pm

    抱歉这个版本没有写log部分和错误处理,停留在“请稍候…”的原因可能是创建不了Socket服务器

  18. feitiger said,

    September 19, 2005 @ 9:20 pm

    legend,加油啊!我已经加你QQ了,保持联系,共同探讨!

  19. David Jiang said,

    September 22, 2005 @ 3:33 pm

    Can you change the licence to LGPL so that I can include your program into a software that’s not licnesed in GPL?

  20. legend said,

    September 22, 2005 @ 4:28 pm

    发布upu v0.21, 增加多语言支持,修改GPL->LGPL

    upu v0.2 released

    - changed the license from GPL to LGPL
    - added multiple language support

    download: http://sourceforge.net/projects/upu

  21. andot said,

    September 27, 2005 @ 8:02 am

    嗯。新的不错啊!争取快点增加对 opera 的支持吧。

  22. 不行啊 said,

    October 10, 2005 @ 1:21 pm

    我的运行环境是:win2000 php4.3.0.0

    根据要求修改了basePath,但是在demo页面上上传的时候,弹出的对话框只能看见“please wait”Remain Time: (Uploaded: Total:)
    Ave Speed:
    这些值都没有,不知怎么回事?

  23. legend said,

    October 10, 2005 @ 1:48 pm

    请阅读需求一:

    1. UPU需要php4.3.0及其以上版本,并打开socket扩展,因为上传过程中需要开临时端口,请注意一下服务器的防火墙设置。

  24. 不行啊 said,

    October 10, 2005 @ 3:51 pm

    1.UPU需要php4.3.0及其以上版本 这个我的版本是PHP Version 4.3.0,应该符合
    2.打开socket扩展 windows 2000中怎么才能打开socket扩展??

  25. 不行啊 said,

    October 10, 2005 @ 4:38 pm

    现在我把扩展socket打开了,通过把“;extension=php_sockets.dll”前面的”;”去掉,来打开的socket扩展

    现在弹出的窗口显示的是“preparing upload”,Remain Time: (Uploaded: Total:29.27 MB)
    Ave Speed:

    然后就没有动静了,请legend 兄帮解释一下,谢谢

  26. legend said,

    October 10, 2005 @ 5:49 pm

    请确认存在upu/temp和upu/files这两个目录,并且可写!

  27. 不行啊 said,

    October 10, 2005 @ 9:25 pm

    我的环境是windows 2000,目录权限是全部开放的
    upu/temp
    upu/files

  28. feitiger said,

    October 10, 2005 @ 10:10 pm

    不错啊,在sf做个project绝对是明智之举!

  29. legend said,

    October 11, 2005 @ 12:36 am

    楼上的楼上可以了吗?

  30. 不行啊 said,

    October 11, 2005 @ 9:10 am

    legend 兄,还是不行

  31. legend said,

    October 11, 2005 @ 10:16 am

    你看一下upu/temp目录下有没有.dat的文件
    如果有,在论坛发一个我看看。

  32. 不行啊 said,

    October 11, 2005 @ 10:46 am

    发上去了,在论坛的php区的贴子“关于upu”的附件,谢谢

  33. legend said,

    October 11, 2005 @ 11:13 am

    你php是以什么方式运行的?CGI还是ISAPI?

  34. 不行啊 said,

    October 11, 2005 @ 11:30 am

    是ISAPI方式,因为我用的是php4isapi.dll来做的php解析

  35. legend said,

    October 11, 2005 @ 11:33 am

    那就不应该了
    你把upu/misc/upu.js里的第49行document.getElementById(“frmSocket”).src = “about:blank”;注释掉看看。

  36. 不行啊 said,

    October 11, 2005 @ 11:45 am

    效果一样

  37. legend said,

    October 11, 2005 @ 12:12 pm

    那我也不知道什么原因了

  38. 求助 said,

    October 12, 2005 @ 11:05 am

    .打开socket扩展 windows 2000中怎么才能打开socket扩展??

  39. legend said,

    October 12, 2005 @ 11:26 am

    在php.ini中把;extension=php_sockets.dll去掉,然后重新启动IIS

  40. To: legend said,

    October 12, 2005 @ 3:30 pm

    首先谢谢这个东东的开发。
    不过在使用中也出现了与上面英雄所说的情况。即当计算出文件大小后就在上传页那里不动了。
    [quote]
    现在弹出的窗口显示的是“preparing upload”,Remain Time: (Uploaded: Total:29.27 MB)
    Ave Speed:
    [/quote]
    按上面留言情况,我看了下端口,应该是打开的了,因为运行后多出2个prot处于listening状态。。
    无防火墙,本机测试,系统win2k,模块方式运行的php,4.3.2版,

  41. 求助 said,

    October 12, 2005 @ 3:34 pm

    我一直上传不了,请问“将upu/temp/, upu/files的目录权限改为755”这一步操作是不是将temp和files文件夹的“共享和web共享”设为可写入就可以。

  42. legend said,

    October 12, 2005 @ 5:20 pm

    To: 楼上:win下一般不需要修改

    To楼上的楼上:请把upu/temp目录下的.dat的文件贴在论坛里,谢谢!

  43. 求助 said,

    October 13, 2005 @ 9:10 am

    首先要对楼主表示感谢!!!
    但是就觉得操作起来有很多问题,很麻烦。我的服务器用的是win2003,目前打开了socket扩展 ,防火墙关闭了。上传不了,请帮查看一下http://www.hnsx.gov.cn/upload/demo.htm
    ”将upu/temp/, upu/files的目录权限改为755“不知道怎修改,没有改

  44. legend said,

    October 13, 2005 @ 9:34 am

    Fatal error: Call to undefined function: socket_create() in D:\sxgzxxw\upload\upu\upu.class.php on line 78

    你没有打开socket扩展,或者修改php.ini后没有重启web服务器

  45. 不行啊 said,

    October 13, 2005 @ 2:17 pm

    看来我的问题也是大家都关心的,希望配置成功介绍一下过程。

  46. legend said,

    October 13, 2005 @ 2:50 pm

    对不住各位了,由于没有做错误处理,导致大家不知道哪里出了错。我在下一个版本中尽量解决。
    不要失去信心。下面是两个运行正常的Demo:

    V0.2: http://www.ugia.cn/upload_private_v0.2/demo.htm
    V0.3: http://www.ugia.cn/upload_private_v0.3/demo.htm

  47. 不行啊 said,

    October 13, 2005 @ 3:55 pm

    legend 兄是怎么配置的,运行环境是什么

  48. legend said,

    October 13, 2005 @ 4:06 pm

    基本不需要特别配置什么

    服务器win2k3+iis6, php以isapi方式运行,打开了socket扩展,没有防火墙。

  49. 不行啊 said,

    October 13, 2005 @ 5:28 pm

    那就奇怪了,我们的怎么不行呢,你的php什么版本

  50. legend said,

    October 13, 2005 @ 5:35 pm

    4.4.0

  51. User said,

    October 20, 2005 @ 7:43 pm

    好东西,呵呵,支持L兄的工作

  52. scott said,

    October 20, 2005 @ 9:55 pm

    legend 兄,我仔细地学习了这个upu的代码,但是我还是看不太明白;请问你能不能将你的设计思想和大家分享分享,学习学习啊!

    请教:为什么要使用php写个socket服务,还独占个端口?让客户端的socket把数据提交到一个php文件来处理不行吗

  53. legend said,

    October 20, 2005 @ 11:47 pm

    请参考我前面的一篇文章:http://www.ugia.cn/?p=54

  54. To: legend said,

    October 24, 2005 @ 5:16 pm

    [quote]
    **********************
    legend said,
    October 12, 2005 @ 5:20 pm

    To: 楼上:win下一般不需要修改

    To楼上的楼上:请把upu/temp目录下的.dat的文件贴在论坛里,谢谢!
    ************************
    [/quote]
    Legend,在dat文件里显示为
    _________________________________________

    POST / HTTP/1.1
    Accept: */*
    Referer: http://localhost/upload/demo.htm
    Accept-Language: zh-cn
    Content-Type: multipart/form-data; boundary=—————————7d51571a3e0560
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    Host: localhost:12435
    Content-Length: 617600
    Connection: Keep-Alive
    Cache-Control: no-cache

    —————————–7d51571a3e0560
    Content-Disposition: form-data; name=”file1″; filename=”C:\Documents and Settings\library\妗岄潰\javascript.chm”
    Content-Type: application/octet-stream

    ITSF

  55. robin said,

    November 6, 2005 @ 11:45 pm

    你好
    用了你的代码,再上传小文件的时候没有问题
    但是上传达文件的时候,文件上传后就不动了。就是再progress得到step = 5;后就不调用postData()了

    请问你有没有遇到这种问题,怎么改?!谢谢

  56. legend said,

    November 7, 2005 @ 4:03 am

    这个问题确实是一个不可重现的bug
    所以最好在上传完成后给出一个按钮,点击按钮执行postData();让用户手动去点击。
    这样保险一些。

  57. ertan said,

    December 15, 2005 @ 1:52 am

    first great work

    it worked for me (apache)

    one question :
    how can i set in mainform different uploadpath ?
    do you still working on this ?

    thanks legend ;-)
    ertan

    ##############################
    here readme on english

    Installation:
    1. Downloads upub0.2.rar, decompress to the website under your webroot
    you get :

    upu/temp
    upu/files
    upu/images
    upu/misc

    chmod to 755
    upu/temp
    upu/files

    2. Open upu/misc/upu.js
    change :
    path to upu folder : var basePath = “/www/user/yourserver/root/upu/ “;
    ip server : var srvHost = “127.1.0.0″;
    domain : var srvAddr = “http://your-domain.de”;

    3.change language

    in upu/progress.php

    find :

    change it to your langfile

    4.
    to use it :
    make a form
    called it from form with onsubmit=”return upuInit(this)”

    example :

    5.testing:

    upu-0.21\upload\demo.htm
    check path:

    and form : action=”test.php”
    #############################
    Attention:
    1. UPU needs >php4.3.0 and opens socket expands,
    because above passes on in the process needs to operate the temporary port,
    please note server the firewall establishment.
    2. upu/temp passes the temporary documents
    upu/files is the document depositing table of contents, these two tables of contents may assign in upu.class.php.

    #########german lang UTF-8 #################
    de.js

    ar lang_completed = “Fertig”;
    var lang_uploading = “Datei wird gerade hochgeladen”;
    var lang_done = “Upload abgeschlossen, Bitte noch kurz warten…”;
    var lang_uploaded = “Upload”;
    var lang_totalsize = “Größe”;
    var lang_elapsetime = “Abgel. Zeit”;
    var lang_remaintime = “Verbl. Zeit”;
    var lang_traspeed = “durs. Geschw.”;
    var lang_plzwait = “Bitte warten …”;
    var lang_prepare = “Upload wird vorbereitet…”;
    var lang_initialize = “Initialisierung …”;
    var lang_hour = “Stunde(-n)”;
    var lang_minute = “Min”;
    var lang_second = “Sek”;
    var lang_ok = “Ok”;
    var lang_cancel = “Abbrechen”;

  58. legend said,

    December 18, 2005 @ 7:43 pm

    Thanks in advance, ertan.

  59. Jeff Yao said,

    January 6, 2006 @ 5:06 am

    Dear Lengend,

    Your software is excellent! Thanks.
    I have a question: How to change ip server value:
    Everything works fine if I use http://localhost/upu/demo.html at my own server
    But if I use: http://www.mydomainname.com/upu/demo.html, I can not get your script work.

    Thanks in advance for your reply!

    Jeff Yao

    Re:
    path to upu folder : var basePath = “/www/user/yourserver/root/upu/ “;
    ip server : var srvHost = “127.1.0.0″;
    domain : var srvAddr = “http://your-domain.de”;

  60. Raymond said,

    January 7, 2006 @ 1:31 pm

    I have made the demo to work but i cant make it upload files. I think this software is great because it gives a window feel of uploading. Thanks in advance

  61. deadlm said,

    January 8, 2006 @ 8:24 pm

    先谢谢legend兄提供这么好的作品
    我由于站点要用,自己修改了下,加入了数据库记录,和自定义了几个新的返回变量
    所以出过很多错误,如楼上所说的停留在初始化或统计完大小后,那几位先把浏览器的js错误打开看看是不是js错误(我用myie一开始就没打开,费了不少功夫),
    如果是js出错那也就是用来做暂时信息记录的文件有错误,把uclass中最后删除暂存文件,然后看看那些暂存文件有无错误或少了哪个暂存文件,然后再自己改一下
    还有,中文也很容易出错,如果下载后没改动过脚本,都是中文文件路径的问题,如楼上的”filename=”C:\Documents and Settings\library\妗岄潰\javascript.chm”
    这问题要看rp的,我两部机一部可以一部不可以,javascript对中文支持不好,php对javascript的支持也不好

  62. deadlm said,

    January 8, 2006 @ 9:04 pm

    不过legend兄,
    我还没试多客户并发上传会不会有问题,这先不说,
    我觉得这种处理方式有很大安全隐患,我改的那个现在根本不敢放上站用,
    我改完之后就发现可以上传任意能上传的文件而不会被删除(除非管理员自己一个个手动删除而不是脚本处理)
    脚本上传完的文件都存在自己定义的目录下(如果是系统目录那就不用管它了),如是虚拟主机,空间不大,很容易就塞满,如上传后不转移目录那更烦,自己一个个删除不知哪个要哪个不要
    想在上传时就限定大小类型有无上传权限什么的又很难(因为各处的限制是不同的,上传脚本在真正处理脚本之前运行,而且无法进行身份验证),我现在都看不大清我是怎么加入限制的了,
    反正不能在表单中加入限制(不然等于没加),这种方式和其它脚本整合起来太麻烦了,那个虚拟服务器和使用的脚本分属两个系统,变换数据非常非常麻烦,我想了很久都没想出解决办法

  63. legend said,

    January 8, 2006 @ 9:15 pm

    这些问题我都注意到了,因为没有加错误处理,所以出错后,用户找不到原因。

    上传得权限及文件限制,这个可以在那个class中加。

    临时文件的自动清理我记得在0.21版中做了吧,0.3版因为时间问题及其他原因暂时不会发布。

    还有一个很大的问题,我还没来的及改,即:我都是在文件上传完成后统一处理,这样如果上传很大的文件,可能出现短时间内cpu利用率非常高。后面的版本我会改正这个问题。

  64. deadlm said,

    January 8, 2006 @ 10:20 pm

    不是说临时文件,是说最后生成在目录的那个上传完成的文件
    因为最后是用javascript提交表单,但如果有恶意的人改动了js脚本,最后不提交,文件上传了,但自己的脚本却没对上传后的文件进行处理,我加进数据库其中一个原因就是要知道用户上传过什么文件
    但一样有问题,因为数据库记录也是在上传完成后再添加的,而用户会半路中止
    class中加限制太过死硬了,如我每个栏目有不同的上传权限,类型大小都不同,有些用户可以有些不可以,而这个脚本是运行在我自己的脚本之前的, 这种情形下会很难处理

  65. deadlm said,

    January 8, 2006 @ 10:35 pm

    最恶意的情形就是有人自己改了个上传页面,一次上传数十个文件,但全部不提交,这样就算在class中限制了文件大小和类型都会被塞暴

  66. legend said,

    January 8, 2006 @ 11:39 pm

    呵呵,这些问题真是防不胜防的。还有一个隐患,我有一个进程是忽略了用户中断,可能会导致一些死进程。

    至于文件类型限制,0.3版里加了一个属性,可以在upload.php中定义允许或者忽略的文件类型。

  67. deadlm said,

    January 10, 2006 @ 6:59 pm

    想了下,发现可以用perl也能很容易做到这样的功能,就php麻烦,一定要系统上传完才给出信息
    我想是不是可以用perl来写个接收文件的接口,不过这样就不是php了,平空多了些麻烦

  68. deadlm said,

    January 10, 2006 @ 9:25 pm

    legend兄,我仔细看过php的上传流程后发现php是真的没什么可能做这样的事,除非新php版本支持
    我还是用回旧的方式,小文件用php不显示信息上传,大文件用ftp
    不过legend兄这种方法也是很巧妙的,虽然在某些场合不大适用
    其实legend兄可以考虑只把js用做信息显示,其它流程不用客户端参与,这可以减少一定的安全问题
    而我加入用户上传记录的确有点多余了

  69. legend said,

    January 11, 2006 @ 9:06 am

    perl的有人写了,上传部分是用的perl,其他的用php,在sf上有,你搜索看看。

  70. imbiss said,

    January 11, 2006 @ 8:14 pm

    我正在做一个ajax+php+perl的上传进度条,是从sf上的几个项目修改过来的。
    主要思路是,表单发送的时候,激活一个服务器段的perl或者php skript,让搜索server的临时目录,找到该临时文件并返回其大小。
    perl版没有问题
    php版本需要·猜测·临时文件的名字。
    目前研发中。
    觉得结合perl最好,而且大多数服务器同时支持perl和php

  71. deadlm said,

    January 12, 2006 @ 10:21 pm

    很久没去过sf(那里项目太多,自己用的固定下来后就不想多改),是那个同时有jsp版的那个项目吧,的确和我设想中的差不多
    呵呵,楼上的说得不大对,perl只是和php比较近,但不一定都开的,我就习惯不开perl,我是信奉越简洁越安全越有效率的,在脚本中连生成的js都是越少越好,我可不想
    某天有用户一上传,结果弹出个窗口问他要保存cgi到哪个目录
    其实如果只是要做到信息显示,方法多着呢,不过我个人比较倾向legend坚持用单一语言解决的方式

  72. deadlm said,

    January 12, 2006 @ 11:22 pm

    嘿嘿,刚才再看时才发现自己有一个地方理解错误,legend兄,佩服佩服,这种接手方式我以前还真没想过,不过最后提交还是可以不交给客户端,暂存目录的大不了限制大小,自动删除

  73. laurent said,

    January 21, 2006 @ 9:07 am

    Hello,

    The file uploaded is realy great, but it seems to have a problem when trying to upload raw text files.
    Actually, when the form contains a lot of tags,
    the PHP $_POST array variable gets strange results just by dumping it.

    Here is what is get :

    Array
    (
    [file1] => Array
    (
    [filename] => Ian Bakkes – Trance Therapy Mix 01.txt
    [clientpath] => C:\Ian Bakkes – Trance Therapy Mix 01.txt
    [savepath] => C:\Program Files\Apache Group\www\attachment\upload\upu\files\366d2cd52d99d4a91235a5fca6bb2f5f.txt
    [filetype] => text/plain
    [filesize] => 476
    [extension] => txt
    )

    [text1] => ty ez(- azhuswxji styss
    [champ01] => 01
    [champ02] => 02
    —————————–7d6119157e005c
    Content-Disposition: form-data; name=”champ03″

    03
    [champ04] => 04
    [champ05] => 05
    [champ06] => 06
    [champ07] => 07
    [champ08] => 08
    [champ09] => 09
    [champ10] => 10
    [champ11] => 11
    [champ12] => 12
    [champ13] => 13
    [champ14] => 14
    [champ15] => 15
    [champ16] => 16
    [champ17] => 17
    )
    Is it a bug form you php code ?

  74. laurent said,

    January 25, 2006 @ 2:04 pm

    Bug report
    Error when uploading small file sized during parsing :
    the php $_POST array variable is not well formatted !

  75. 红雨 said,

    January 31, 2006 @ 3:15 pm

    PHP用Apache 模块方式安装不行

    好像有问题,停在初始化上传不上去,不知道是什么原因

    http://test.cbons.com/

  76. sam said,

    February 10, 2006 @ 5:40 pm

    我试过在Netscape和Opera下不能运行,有IE和火狐下通过
    Netscape 显示please wait就不动了,什么信息也没读出来
    Opera 显示 prepiring upload 就不动了,读出了要上传文件的大小

  77. Abhinav said,

    February 13, 2006 @ 12:27 am

    It keeps telling initialising and then it stops

  78. fasten said,

    February 17, 2006 @ 1:51 am

    上面各位英雄提出的问题,我也一样遇上,我在本机上(WINXP APACHE PHP438,出现ini….就动不了了。后来,我把文件上传到商业服务器(LINUX APACHE PHP438)上,结果一切正常。我估计是本机的配置出了问题,扩展SOCKET也打开了,其它就真不知在哪修改了。

  79. Thanat0s said,

    February 25, 2006 @ 12:47 am

    it doesn’t work for me.
    He it stops at initializing.
    my website is oomph361.free.fr

    php 4.3.10 and phpinfo() says Socket Support is Enabled but chmod files/ and temp/ is 700 (i can’t change it)

  80. Leon.Z said,

    March 2, 2006 @ 10:01 am

    我已经调通了。的确是很历害的哦。正考虑怎么和xajax结合在一起。xajax好像可以做很多事情,但上传文件这一块却是没有的。
    文件结构为:
    ————————————————————————
    .:
    demo.htm test.php upu

    ./upu:
    ChangeLog README getinfo.php misc temp upu.class.php
    LICENSE files images progress.php upload.php

    ./upu/files:
    2924ca871995a63576831336ab7a160a.mov b2ee6a963acc81c3c3f50a32b2bd5b0e.doc

    ./upu/images:
    finish.gif upload.gif

    ./upu/misc:
    progress.css progress.js upu.js

    ./upu/temp:
    ————————————————————————

    upu/misc/upu.js 中改动为:
    var basePath = “upu/”;

    demo.htm内容为
    ————————————————————————

    upu demo page

    ————————————————————————

    test.php内容为:
    ————————————————————————

    “;
    print_r($_POST);
    echo “”;

    ?>
    hello
    ————————————————————————

    我用的是win2000+PHP Version 4.3.8+Apache 2.0 Handler
    php.ini 要打开 extension=php_sockets.dll
    可以事先测试一下socket_create()是否可用。
    写个小php,调用一下这个函数,看看apache的log里是否会报错。

    爽啊!

  81. Leon.Z said,

    March 2, 2006 @ 10:02 am

    倒了。把发的html和php给屏蔽掉了。

  82. wang.weiqi said,

    April 4, 2006 @ 1:01 am

    程序已经调通,真的很强,我已经在我的网站里使用了,效果不错!现在我使用xp和红旗ws5访问都很稳定。

    测试后发现如果多个人使用此程序上传要占用多个端口,我怎么才能让防火墙自动的打开socket需要的端口呢,
    我服务器用的是2003,使用的防火墙是2003自己带的,现在是同时开放20个端口,我手动一个一个在防火墙规则里加的而且是始终开着,总觉的有些不太安全。

    各位看有什么好的解决方法没。

  83. sbear said,

    June 3, 2006 @ 1:24 am

    socket端口是固定的还是??请问是什么端口

  84. w_wei said,

    June 10, 2006 @ 7:39 am

    Please wait …

    Remain Time: (Uploaded: Total:)
    Ave Speed:

    关闭了防火墙,开了socket!
    还是搞不定啊!

  85. ice said,

    June 28, 2006 @ 8:21 pm

    下载UPU0.21包不能用的看过来:

    我这里说的不能用指的是上传那个进度窗口会跳出来,但是不动。
    问题的原因是整个UPU系统设定的编码是UTF-8,但是作者发布的时候出了点小纰漏,upu.class.php这个文件不是UTF-8编码的,这个文件中有一些中文字符串从而出问题。
    解决方法:把upu.class.php用utf-8编码重新存一次就是了。方法应该很多,我用editplus解决的:打开upu.class.php,另存,过滤器选择utf-8,选好文件名确认。

    作者把这问题修正一下重新发布一个包吧,省得大家一头雾水干瞪眼。

  86. laizg said,

    June 30, 2006 @ 9:30 pm

    我的到了 正在上传的时候就停止了。郁闷。还有lemond的qq多少 ??谢谢。

  87. swder said,

    July 12, 2006 @ 4:40 am

    php uploader 可不可以断点续传?

  88. wxcyz said,

    July 14, 2006 @ 6:06 pm

    Preparing upload …

    Remain Time: (Uploaded: Total:14.66 KB)
    Ave Speed:

    讀出了文件的大小,但是上傳不了

  89. 55feng said,

    July 15, 2006 @ 5:23 am

    厉害,厉害,解决了我几个星期以来苦思冥想的难题

  90. 路过 said,

    July 21, 2006 @ 8:21 am

    大家有特别的需要就自己改啊,legend提供方法就ok了
    上面有个人说不能运行是RP问题,不会就不会,扯什么rp

  91. David said,

    September 7, 2006 @ 6:09 pm

    您好,我測試了該程式後,
    解除了防火牆、也安裝了socket擴充,
    在上傳小檔案時是 OK 的。
    我測試的結果有幾個問題:
    1.不是每次都會馬上運作,我猜是程式在找可以連接的Socket,再進行上傳。
    2.因為關閉了防火牆,會有安全的疑慮。是否可以限制連接的Socket區間呢?
    3.在上傳較大的檔案時,幾乎都不能成功,最後的結果是上傳的動畫仍在跑,時間仍在計算,但是其實檔案卻沒有繼續上傳。
    4.我看以上朋友的環境似乎都在 Windows 上,那 Unix Like 的系統是否會有差異。
    很希望這樣的棒的作品有更完美的解決,也希望作者能有更好的版本釋出。

  92. fanfuzd said,

    September 12, 2006 @ 11:21 pm

    Unix/Linux下安装PHP时要在configure中加上"–enable-sockets"选项才能打开Socket函数.

  93. ak said,

    September 21, 2006 @ 8:07 am

    修復上傳時中斷, 原表單不更新, 再上傳他檔會發生的錯誤
    修正的檔案:upu.js
    function cancel()
    {
    clientForm.action = realAction;
    //clientForm = “about:blank”;
    document.getElementById(“frmUpload”).src = “about:blank”;
    }

  94. ak said,

    September 21, 2006 @ 8:14 am

    3.在上傳較大的檔案時,幾乎都不能成功,最後的結果是上傳的動畫仍在跑,時間仍在計算,但是其實檔案卻沒有繼續上傳。
    這跟 php.ini 檔案中, 上傳檔案最大限制有關,
    可在程式加個 判斷式, 判斷要上傳的檔案是否大於 upload_max_filesize = 2M(原設值)

  95. legend said,

    September 22, 2006 @ 1:25 am

    这个应该不是php.ini的限制,利用socket之后,就跟php无关了。可能是web服务器的脚本执行时间限制,到一定时间把upload.php杀死了。
    这个问题是不能避免的,最新的版本也没解决不了,就连错误信息也无法提示。

  96. lovehut said,

    September 25, 2006 @ 1:34 pm

    内嵌式怎么实现,在线等!

  97. legend said,

    September 25, 2006 @ 2:19 pm

    内嵌式需要修改js文件,工作量比较大,如果你熟悉js的话,就自己改吧,呵呵呵。

  98. lovehut said,

    September 25, 2006 @ 2:32 pm

    Legend你的QQ是多少,我的QQ:79196070,加我,我有问题问你,谢谢了

  99. lovehut said,

    September 25, 2006 @ 2:35 pm

    如果用内嵌式,opener属性就不支持了,我不会改,legend你有这些代码吗,有请发给我一份,谢谢了

  100. dddddd said,

    September 25, 2006 @ 6:02 pm

    怎样判断文件大小,假设,文件最大为5M,大了就提示文件过大,怎么实现,!

  101. looked said,

    September 26, 2006 @ 1:49 pm

    把upu稍微改了一下,可以限制文件,以及对文件类型的限定等,下载:

    http://210.45.240.67/20044371/upload.rar

  102. looked said,

    September 26, 2006 @ 1:52 pm

    DEMO.HTM
    ——————–

    视   频 :

    缩略图 :

    文件描述 :

  103. looked said,

    September 26, 2006 @ 10:23 pm

    内嵌式,主要是修改js,在页面内打开一个浮动窗口,应该可以解决的

  104. fenghan said,

    October 5, 2006 @ 3:29 am

    大家好 , 我有个问题想大家请教下, 我 得服务器时 server2003 iis6.0 。
    我用upu出现了个问题, 我上传文件时 本机传本机没问题, 从其他机器传服务器时 到了初始化后 就不动了
    /temp 文件下就只有srv 文件, 根本就没上传文件。 我认为是(upload函数中的)submit 没有提交表单,但也没提示出现错误,我找不出原因。 请大家指教

  105. looked said,

    October 7, 2006 @ 10:52 pm

    防火墙关掉

  106. fenghan said,

    October 8, 2006 @ 3:50 am

    不知道是防火墙问题吗,我就有个windows 自带的防火墙 是默认设置。
    looked 你能提供给你改写程序后 实用demo 吗

  107. leo said,

    October 10, 2006 @ 4:09 pm

    确实是这样,初始化。。。就不动了。。
    不过在本机测式没问题,LAN里的做服务器也没问题。2k 2k03都行

  108. looked said,

    October 14, 2006 @ 11:10 pm

    Re fenghan

    源码主demo在上面都有了,就是
    DEMO.HTM
    ——————–
    下面的内容,把里面的代码copy一下就可以了,明白否?

  109. klzheva said,

    October 25, 2006 @ 9:14 am

    正常上传没问题,但是上传过程连续取消几次会导致IIS死掉,还有端口。。。。

  110. klzheva said,

    October 25, 2006 @ 9:16 am

    期待改进,支持你`~~!

  111. klzheva said,

    October 25, 2006 @ 9:16 am

    期待改进,支持你`!

  112. klzheva said,

    October 25, 2006 @ 9:16 am

    期待改进,支持`!

  113. 不要清闲 said,

    October 25, 2006 @ 7:21 pm

    我在本地测试一切正常
    但是上传到服务器上后就一直停留在 “初始化” 界面
    查看temp文件夹里有很多后缀的文件 包括*.dat
    Socket扩展我也打开了
    windows的防火墙我也关了拭的
    但是始终不能上传上去
    但是有一点
    我在服务器的机子上可以上传上去!!!!!!!!!!!!
    我估计是防火墙的关系
    不知道怎么去设置
    不是简简单单就把windows的防火墙关了就可以了吧?

  114. 不要清闲 said,

    October 26, 2006 @ 8:50 am

    http://www.live-share.com/
    大家看看这个网站的上传功能
    看了看 也是用的upu
    从网上查了查 用的好象是upu0.5
    真有这个版本吗?

  115. klzheva said,

    October 26, 2006 @ 11:19 am

    好像有,谁可以提供个DEMO呢~~?

  116. looked said,

    November 4, 2006 @ 1:04 pm

    re 不要清闲
    有 *.dat 文件说明已经开始上传了,至于一直停留在 “初始化” 界面,可能是js哪里出了些问题吧.

  117. Debiaret said,

    December 4, 2006 @ 2:18 pm

    Very good site! I like it! Thanks!
    Free Lesbian Porn Clips
    [url=http://1freelesbianpornclips.blogspot.com]Free Lesbian Porn Clips[/url]

  118. http://www.links-group.net/tramadol-online.htm said,

    December 20, 2006 @ 2:14 pm

    Cool guestbook!!!— tramadol[url=http://www.links-group.net/drug-tramadol.htm]tramadol[/url]

  119. chenkai said,

    December 26, 2006 @ 6:23 pm

    仔细研究了一下您的代码,发觉您真的好强啊。
    不过在处理数组类型的表单控件,比如checkbox、数组类型的文本域(e.g.多个text用同一个形如“text[]”的变量名的时候)等的时候好像会出现问题啊。
    v2.1版的在对那些进行处理的时候直接fread()了,这样就会导致像之前那个叫laurent的外国朋友所说的直接读出的错误了。
    在对formData进行处理的时候不应该只考虑file这一种数组的情况哦,legend老大。
    因此需要修改的地方有3处,一处是upu.class.php中对数据流整合分析,存入$this->formData的时候;一处是紧接着的对$this->formData进行处理,转存成$form好存入.frm的时候;还有一处是getinfo.php中第5步的处理时。
    不知道老大的3.0修正了这个没有,小弟热切期待啊!
    据说3.0修改了传输协议,不知道有没有包含对表单数组控件的处理;
    要是老大的这个东东能和checkbox等数组类型的控件共存的话,那应用范围可就广啦!

  120. chenkai said,

    December 26, 2006 @ 6:39 pm

    哦,对了,我附一下包含checkbox控件的时候的返回的表单结果吧:
    Array
    (
    [file1] => Array
    (
    [filename] => 20060926185832819024.jpg
    [clientpath] => E:\文件与设置\ChenKai\My Documents\My Pictures\354\20060926185832819024.jpg
    [savepath] => files/20060926185832819024_f85bde4787ddc172be2236d5d012c071.jpg
    [filetype] => image/pjpeg
    [filesize] => 129708
    [extension] => jpg
    )

    [file2] => Array
    (
    [filename] => 02.jpg
    [clientpath] => E:\文件与设置\ChenKai\My Documents\My Pictures\girl2.jpg
    [savepath] => files/02_9b91752b01efcae3e53aede166bc7ed1.jpg
    [filetype] => image/pjpeg
    [filesize] => 54013
    [extension] => jpg
    )

    [file3] => Array
    (
    [filename] => 020.jpg
    [clientpath] => E:\文件与设置\ChenKai\My Documents\My Pictures20.jpg
    [savepath] => files/020_93125fb25fdb5d29fc2978899785b7d7.jpg
    [filetype] => image/pjpeg
    [filesize] => 37217
    [extension] => jpg
    )

    [checkbox] => A
    —————————–7d61093460a96
    Content-Disposition: form-data; name=”checkbox”

    B
    [text1] => uil;jkl
    )

    主要就是上面的那部分,本来是数组的,结果当成一般变量直接fread了

  121. chenkai said,

    December 26, 2006 @ 11:06 pm

    弄清楚是怎么回事了,之所以出现上面的问题是因为对同一个表单之内的同名的表单控件(比如checkbox,比如name属性为形如text[]的一系列控件),由于多次出现了同一个boundary(—————————–7d65d1b1a0620\r\nContent-Disposition: form-data; name=”checkbox”)使得v0.21版本的upu.class.php在处理的时候把重复部分boundary忽略,而当成了控件的value了。
    希望legend老大能够解决一下,不胜感激!因为小弟非常希望这个upu能够做得尽可能通用,这样以后我的项目就可以用老大的这个代码当作所有上传的核心代码了
    我的邮箱是orochi114@126.com
    期待老大的回复!如果问题解决了老大记得给我发封邮件,我将感激涕零…先谢谢老大了

  122. REC0N said,

    December 28, 2006 @ 6:51 pm

    谢谢 !!

  123. ^_^alex said,

    January 14, 2007 @ 9:54 pm

    legend兄,您的想法真的很好啊!非常希望能拜您为师父!要不加我QQ:515218805聊聊?多谢!

  124. zhong said,

    January 16, 2007 @ 11:15 am

    请问,没有开发新版本了吗?一直关注希望能有更好的版本可以用,不要令我们失望阿,多谢!

  125. lls said,

    January 17, 2007 @ 5:56 pm

    我的也传不上去哦

  126. evan said,

    February 7, 2007 @ 3:03 pm

    请问,在上传过程中为什么老出现 js错误,错误信息是 行:82 字符:13 错误内容: “ post” 未定义,
    我用你的demo.htm文件没出现这种问题。用我的页面就不行了。我到files目录下看了,文件已经成功上传了,
    但就是无法提交表单。
    这个问题已经困扰我几天了,麻烦legend 帮忙解决一下,谢谢。

  127. legend said,

    February 7, 2007 @ 5:51 pm

    你把你页面的源码贴出来看看

  128. evan said,

    February 9, 2007 @ 1:58 pm

    谢谢legend,问题已经解决,是因为程序和页面编码的问题,我们用的编码都是ANSI
    而你采用的是UTF-8编码,所以会出现这种JS的错误。
    Thanks,you are so excellent!!

  129. Rick said,

    March 2, 2007 @ 5:32 am

    首先谢谢legend的代码。当我在我自己的电脑里测试的时候一点问题都没有,(用的是winxp,apache)。
    但我上传到服务器后问题就出现了(linux)。 是因为程序找不到我正在上传的文件。后来我在progress.php找到这段代码,
    $processID = md5(microtime() . mt_rand(0, 99999));
    processID 是一个30几个字母的字符串, 它将成为upu查找的文件名。。 但是每次都在 /tmp/ 目录里找不到这个文件。
    我想请问正在上传的文件路径不是应该类似 /tmp/phpPMQP2p 的吗? 为什么可以自己创造自己的文件名呢? 是不是我其他配置上有问题?

  130. legend said,

    March 2, 2007 @ 9:20 am

    因为这不是用的php自身所带的上传功能。

  131. panyue said,

    March 3, 2007 @ 4:30 pm

    Legend你好,找了很久PHP uploader script,今天有幸看到你的UPU,向讨教几个问题:
    1、0.3版本何时发布啊,为了找这样的程序花了几个月,仍没找到何时的;
    2、Live-Share.com是不是UGiA PHP UPLOADER的0.3版本呢?

    如果Legend兄看到,请回信,我的msn&email:panyue@masedu.cn,QQ:93690706,十分感谢
    另外,我可以长期提供给你空间测试DEMO

  132. legend said,

    March 3, 2007 @ 4:32 pm

    live-share是用的0.5版本
    upu暂时不会发布新版本了

  133. panyue said,

    March 4, 2007 @ 12:52 am

    我很需要这样的程序啊,想在城域网内做一个内部下载,不知道legend 可否卖一套给我?
    当然我绝不会发给其他人使用。

  134. panyue said,

    March 4, 2007 @ 12:54 am

    我已经找了很久了,可惜没一个满意的

  135. legend said,

    March 4, 2007 @ 1:11 am

    考虑其他语言吧,或者其他方式

    upu还是有许多先天性的弱点。

  136. panyue said,

    March 4, 2007 @ 1:19 am

    老大,我就看上你的程序了,给个测试吧,我的QQ:93690706

  137. evan said,

    March 5, 2007 @ 12:00 pm

    legend,问一下
    在你这个程序中是不是使用了 net.exe,net1.exe进程
    我看服务器端出现了很多这样的死进程,有解决办法么?

  138. legend said,

    March 5, 2007 @ 12:02 pm

    没有用到

    net.exe一般是提升权限的时候用这个,你服务器估计中木马了。

  139. gzty said,

    March 6, 2007 @ 3:59 pm

    是否可以在function UPU ()里面加上
    if( !extension_loaded(’sockets’) )$this->dl_socket();

    然后添加函数
    function dl_socket()
    {
    //$dl = (DIRECTORY_SEPARATOR == ‘\\’)? ‘php_sockets.dll’ : ’sockets.so’;
    $dl = ((PHP_SHLIB_SUFFIX == ‘dll’) ? ‘php_’ : ”) . ’sockets.’ . PHP_SHLIB_SUFFIX;

    dl($dl) /*or die(UPU_CANT_DL_SOCKETS)*/;
    unset($dl);
    }

    ---------------------
    但是有个问题
    dl执行问题

  140. carlos said,

    April 10, 2007 @ 3:50 pm

    很不错,不过作者怎么不继续开发了哪?

  141. Cyrus said,

    April 10, 2007 @ 9:13 pm

    關於打开socket扩展

    在 Linux 上是指你 compile PHP 的時候要加 ‘–enable-sockets’
    即 ./configure –enable-sockets

    你有可能要先重新 compile PHP 才可成功使用本程式

    小弟有一問題想請教, 為什麼 getinfo.php 不直接讀放在 /tmp/ 上,正在上傳的文件大小而要直接在服務器建立上傳 的 socket ?

  142. legend said,

    April 10, 2007 @ 10:17 pm

    因为无法得知/tmp/里正在上传的文件名

  143. mtlong said,

    May 10, 2007 @ 4:20 pm

    当我使用upu上传文件时,非文件域表单在接受数据时经常出现上面的错误,请教legend 兄这是什么原因呢

  144. mtlong said,

    May 10, 2007 @ 4:21 pm

    input value=”12345678909
    —————————–4594694713592
    Content-Disposition: form-data; name=”province”

    416″ name=”mobile” type=”hidden”

    刚才错误信息没有显示出来

  145. cdcomic said,

    May 17, 2007 @ 2:08 pm

    终于搞定了,花了N久时间找问题源头,哈哈~~如果大家遇到上传大文件卡住的问题试试这样修改:

    upu.class.php 查找:

    fwrite($writeHandle, @fread($readHandle,$this->formData[$k]['filesize']));

    修改为:

    while($fred = @fread($readHandle,1024))
    {
    fwrite($writeHandle,$fred);
    }

    即可:)

    再次感谢作者提供那么好的程序…

  146. laocai said,

    May 21, 2007 @ 2:56 pm

    我在本机上测试是好的,但放到服务器上就不行了。
    停在Initializing…这个状态。请问是什么原因?
    我看了temp 文件夹下已生成了两个文件。

  147. adxliu said,

    June 14, 2007 @ 7:12 pm

    我用upu出现了个问题, 我上传文件时 本机传本机没问题, 从其他机器传服务器时 到了初始化后 就不动了
    /temp 文件下就只有srv 文件, 根本就没上传文件。
    我在upu.class.php写log的文件,发现问题出在这句上$uRequest=socket_accept($uSocket);这句上,
    在本地上传一切正常,到了其它的机子执行到这句就不行了,不报错,也执行下面的。
    请给个解决方案吧,谢谢!

  148. adxliu said,

    June 15, 2007 @ 1:56 pm

    我已经调通了,谢谢!

  149. Fire said,

    July 3, 2007 @ 11:56 pm

    cdcomic said,
    May 17, 2007 @ 2:08 pm

    终于搞定了,花了N久时间找问题源头,哈哈~~如果大家遇到上传大文件卡住的问题试试这样修改:

    upu.class.php 查找:

    fwrite($writeHandle, @fread($readHandle,$this->formData[$k][’filesize’]));

    修改为:

    while($fred = @fread($readHandle,1024))
    {
    fwrite($writeHandle,$fred);
    }

    即可:)

    再次感谢作者提供那么好的程序…

    我测试发现,300M的以上的文件会出现写不完整的情况.

  150. rjekolod said,

    July 12, 2007 @ 12:53 pm

    Hello

    Looks good! Very useful, good stuff. Good resources here. Thanks much!

    G’night

  151. meik said,

    July 13, 2007 @ 4:34 pm

    请问一下,怎么得到上传后的完整路径和文件名呀,我是新手,大家帮帮忙

  152. h7 said,

    July 24, 2007 @ 5:56 pm

    我在upu.class.php写log的文件,发现问题出在这句上$uRequest=socket_accept($uSocket);这句上,

    我的也是在这一句上卡住了,是什么原因呢

  153. torokilopz said,

    August 4, 2007 @ 8:29 pm

    Hello

    Your site is very cognitive. I think you will have good future.:)

    Bye

  154. simon said,

    August 8, 2007 @ 8:51 am

    当我上传200M的文件时
    文件可以全部上传
    但是一直停留在“上传成功,请等待”的界面上
    apache日志中一直有这个

    127.0.0.1 – - [08/Aug/2007:08:48:03 +0800] “GET /upu/getinfo.php?processID=120b3a1c30045f1203100040cb866b5e&step=5&tmp=0.2393307602506275 HTTP/1.1″ 200 – “http://localhost/upu/progress.php?tmp=0.5802721162825157″ “Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5″

    非常感谢

  155. tolikimer said,

    August 22, 2007 @ 1:26 am

    Hello

    Hi! I like your site. Thanks for more interesting information. I wish good luck to you. Thanks!

    G’night

  156. qunxyz said,

    August 30, 2007 @ 6:03 pm

    我很认真看了这个程序。很不错。只是还有比较多的问题。
    一个是端口是随机分配的,防火墙不好开端口。
    二个是端口的重用问题,这个应在建立socket时用socket_set_option设置一下
    三个是不应当允许这个程序在后台运行,我禁用了ignore_user_abort。
    还有一个最好加清临时目录的操作。因为我在apache1.3.3+php4.3.11的环境下发现有临时文件时上传失败的问题。
    希望越改越好

  157. Jeffy said,

    September 1, 2007 @ 11:53 am

    这个程序怎么实现远程上传? 比如说我程序页面A服务器,文件上传在B服务器

  158. coovol said,

    September 12, 2007 @ 2:23 pm

    为什么我的程序上传到2.86MB就传不上去了,我试过好几次都是这么奇怪!

  159. lin said,

    September 17, 2007 @ 11:45 pm

    legend,你的QQ号多少啊

  160. Buy levitra said,

    September 27, 2007 @ 2:21 am

    Hi

    I am Lucy, I have found your website while searching for some info at Google. Your site has helped me in a big way.

    http://echo.gmu.edu/toolcenter-wiki/index.php?title=Buy_levitra free levitra

    Bye

  161. Jellnoggeby said,

    December 9, 2007 @ 5:30 am

    I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting!

  162. feng said,

    December 15, 2007 @ 12:35 am

    我在上传的时候加了个文本域输入中文post过去后显示出来是乱码 请问是为什么?

  163. Jellnoggeby said,

    December 17, 2007 @ 11:41 pm

    I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting! Look for some my links:

  164. lampmvc@qq.com said,

    December 26, 2007 @ 12:40 am

    help ; need help ! add me!

  165. redlz2500 said,

    January 6, 2008 @ 2:49 pm

    about ff compatibility in Form post
    the filename of input-file is no dir(winxp,ff2.0)
    so the regeneration will loss the first char in the function getBaseName($path)
    change the code as this will fix the bug:

    function getBaseName($path)
    {
    $path = str_replace(“\\”, “/”, $path);
    if(!strrpos($path, “/”)){
    return $path;
    }else{
    return substr($path, strrpos($path, “/”) + 1);
    }
    }

  166. redlz2500 said,

    January 6, 2008 @ 7:38 pm

    when browse by ie and ff
    the result is different
    ff2.0, winxp sp2, ie6.0, web server apache2.x+php5.x, page charset is gb2312
    the ugia default charset is utf-8
    after changed all page in ugia the situation is still bad
    not only the interface about progress.php, but also with my file-uploaded function
    so i made some change to deal the question
    first: change my server charset into utf-8, no way
    second: encode the output of getinfo.php and decode in progress.js, but work bad
    third: check the client’s browse, if not M$IE, then do nothing, this means the output is still my charset set:gb2312; if is M$IE, so use “mb_convert_encoding($output, ‘utf-8′, ‘gb2312′);” to make the utf-8 output
    code change:
    1, all charset is change into gb2312
    2, in getinfo.php, check the client’s browse, then in step3,4,5 echo the corresponding char

  167. yongnengyong said,

    January 16, 2008 @ 5:05 pm

    为什么我得到的文件名是乱码呀?

  168. xiaozhang said,

    January 18, 2008 @ 8:53 am

    首先非常感谢您们提供的UPU,但我在使用中遇到了一个问题,那就是upload后,获取其上传文件的标题和内容,发现是乱码,不知道怎么解决,我用的是upu0.2

  169. yongnengyong said,

    January 18, 2008 @ 2:11 pm

    请问一下,怎么不能上传音频文件呢?

  170. 馬小九 said,

    January 24, 2008 @ 3:48 am

    可以把進度條 拿掉嗎?
    也就是上傳的時候不要顯示進度的視窗
    可以嗎?

  171. just said,

    July 2, 2008 @ 6:22 pm

    做点事情都不能持之以恒,还有什么用??
    浪费大家对你的一片期望!!
    BS你这种技术清洁工!

RSS feed for comments on this post

Leave a Comment

What's a blog without spam? WP-Hashcash.