|
Posted by James Barrett on 10/04/07 12:06
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ming wrote:
> Hi there,
>
> Is there a handy way to show error message instead of error code when
> uploading?
>
> For example, if I get error code 3 (UPLOAD_ERR_PARTIAL), I can
> directly show users that 'Only part of the file was uploaded.' instead
> of if $errorCode==3 then print 'Only part of the file was uploaded.',
> which is time-consuming.
>
> Thanks,
>
What's wrong with $errorCode==3?
I would probable create an array of all error messages, where each
element index corresponds to an error number. Then you could simple say
something like;
echo $errorArray[3];
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHBNdJQuDJiZ/QrH0RAm4/AKCp4B9VokQ2RtzMaazNuihRwZoX6wCgm2Ig
n6LUlFaglf/D/g2bBNqc/jY=
=Q4ot
-----END PGP SIGNATURE-----
[Back to original message]
|