28, May 2012

some problem while uploading existing files - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: some problem while uploading existing files
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: some problem while uploading existing files  (Read 3814 times)
Total Zero
*
Posts: 5
34 credits
Members referred : 0


« on: Aug 21, 2006, 09:08:14 pm »

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!
« Last Edit: Aug 21, 2006, 09:33:34 pm by olaf »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


Re: some problem!
« Reply #1 on: Aug 21, 2006, 09:33:13 pm »

first: welcome and thank you for the translations Wink (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)

Total Zero
*
Posts: 5
34 credits
Members referred : 0


« Reply #2 on: Aug 21, 2006, 10:15:55 pm »

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)

* Chinese characters.txt (0.74 KB - downloaded 2 times.)
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Aug 21, 2006, 10:42:32 pm »

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

Total Zero
*
Posts: 5
34 credits
Members referred : 0


« Reply #4 on: Aug 21, 2006, 11:05:03 pm »

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

* Chinese characters.txt (0.91 KB - downloaded 2 times.)
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Aug 22, 2006, 08:07:05 am »

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'])) {

Total Zero
*
Posts: 5
34 credits
Members referred : 0


« Reply #6 on: Aug 22, 2006, 10:13:21 am »

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
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Aug 22, 2006, 12:27:23 pm »

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?  Shocked

Total Zero
*
Posts: 5
34 credits
Members referred : 0


« Reply #8 on: Aug 22, 2006, 01:00:06 pm »

by mistake at first! haha!!

Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Aug 22, 2006, 01:10:29 pm »

by mistake at first! haha!!



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

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...

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3748
Tags : php google font email Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: some problem while uploading existing files
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 03:16:02 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.