Sublime directory Surf the web anonymous Pagerank Monitor


some problem while uploading existing files

samon127
Mon 21 August 2006, 09:08 pm GMT +0200
first:
I translate error reporter to Chinese characters, thank you for your better class!

case "zh":
$error[0] = "文件:<b>".$this->the_file."</b> 上传成功!";
$error[1] = "您上传的文件超过了文件的最大限制。";
$error[2] = "只能上传小于 MAX_FILE_SIZE 的文件。";
$error[3] = "文件只上传了一部分";
$error[4] = "文件上传失败";
$error[10] = "请选择一个需要上传的文件!";
$error[11] = "只能传递以下各式的文件:<b>".$this->ext_string."</b>";
$error[12] = "对不起,文件名包含有非法字符,请使用数字,字母,和下划线 <br>一个合法的名称";
$error[13] = "文件名不能超过 ".$this->max_length_filename." 个字符。";
$error[14] = "对不起,上传的文件路径不存在";
$error[15] = "文件 <b>".$this->the_file."上传错误</b> 对不起,有一个同名文件已经存在。";
$error[16] = "文件被重命名为 <b>".$this->file_copy."</b>.";
$error[17] = "文件夹 %s 不存在。";
break;

second:
I got some problem with Easy PHP Upload, when I upload a picture not exists, class would upload a null file with 0 bite and rename it, have you ever met this problem?

third:
you can mail me anytime if you need Chinese characters support!thank you!

olaf
Mon 21 August 2006, 09:33 pm GMT +0200
first: welcome and thank you for the translations ;) (please send me the translations inside a text file, I'm afraid the some thing get wrong)

second: sounds like that the chmod value is not OK (bad server configuration), tell what are current CHMOD values of the folder and the successfull uploaded files

Third: Thank you, I will remember that (please send a short message via my contact form to get your e-mail address)

samon127
Mon 21 August 2006, 10:15 pm GMT +0200
E-mail:samon127@gmail.com

and I send a attachment of the Chinese characters.

At this demo address http://www.finalwebsites.com/demos/php_file_upload.php
I try to upload a file C:\Documents and Settings\Administrator\desktop\u11233.zip
in fact this file is not exists, and it reply me: File: u11233.zip successfully uploaded!

sorry for my poor php knowledge about CHMOD, and I will google it tomorrow (at my timezone GMT +8)

olaf
Mon 21 August 2006, 10:42 pm GMT +0200
is this zip file OK on your desktop (can you open it) the file is uploaded at the demo site check the select and try a different zip file...

by the way the text file is not OK while I have installed chinise fonts, check this post:
http://www.webdigity.com/index.php/topic,3341.20.A+way+around+iconv.html

samon127
Mon 21 August 2006, 11:05 pm GMT +0200
is this zip file OK on your desktop (can you open it) the file is uploaded at the demo site check the select and try a different zip file...
the file is not exists, and I wish it could tell me "your file is not exists, please try again", if this file is exists, I can upload it very well.

by the way the text file is not OK while I have installed chinise fonts, check this post:
http://www.webdigity.com/index.php/topic,3341.20.A+way+around+iconv.html

there are kinds of Chinese fonts, the characters I send to you is Simple Chinese, and I change the txt coding to utf-8 now, if still not correct, hope this could help you http://www.ansell-uebersetzungen.com/gbuni.html

olaf
Tue 22 August 2006, 08:07 am GMT +0200
is this zip file OK on your desktop (can you open it) the file is uploaded at the demo site check the select and try a different zip file...
the file is not exists, and I wish it could tell me "your file is not exists, please try again", if this file is exists, I can upload it very well.


You must validate the file field before upload:
if (!empty($_FILES['some_var']['name'])) {

samon127
Tue 22 August 2006, 10:13 am GMT +0200
thank you for your advise! And I've solved this problem by:
if($_FILES['some_var']['size'] > 0) {

$_FILES['some_var']['name'] will exists when I upload a not exists file

olaf
Tue 22 August 2006, 12:27 pm GMT +0200
thank you for your advise! And I've solved this problem by:
if($_FILES['some_var']['size'] > 0) {

$_FILES['some_var']['name'] will exists when I upload a not exists file
how do you upload a non existing file?  :o

samon127
Tue 22 August 2006, 01:00 pm GMT +0200
by mistake at first! haha!!


olaf
Tue 22 August 2006, 01:10 pm GMT +0200
by mistake at first! haha!!



yes that's why I ask you have to select a file all the time ;)

but first you have to validate the file field entry like in the example files...

buy the way a file upload with a default value in the file field doesn't work you have to select one...

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional