PHP Classes

test

Recommend this page to a friend!

      Hybrid Upload Class  >  All threads  >  test  >  (Un) Subscribe thread alerts  
Subject:test
Summary:problem with uploading file
Messages:4
Author:Kerroch
Date:2005-07-11 16:07:42
Update:2005-07-13 08:33:56
 

  1. test   Reply   Report abuse  
Picture of Kerroch Kerroch - 2005-07-11 16:07:42

Hello ,
I have found this Website recently and I want to test some class.

is there any body who has tried this Upload class??
it works well?
I try to test with apache, php5 but when I want to upload a file (size 1 ko)or any file else I have the error (no file or too big file).

Have you and idea what is the problem?

  2. Re: test   Reply   Report abuse  
Picture of Mhyk Duterte Mhyk Duterte - 2005-07-11 20:49:19 - In reply to message 1 from Kerroch
If you have a file input field named 'upload' (e.g. <input type="file" name="upload" />), your script should look like $upload = new Upload('upload','/dir/to/upload/');

Please also note that this has not been tested on servers running PHP5 yet.

  3. Re: test   Reply   Report abuse  
Picture of Kerroch Kerroch - 2005-07-13 06:03:07 - In reply to message 2 from Mhyk Duterte
hello,

I use PHP 5.0.4
and the function getVersion() returns 3. (as it is a php <=4)



function getVersion()
{
$version = phpversion();
$version = explode('.',$version);

if ( ($version[0] = 4 && $version[1] >= 1) ){
return 4;
} else {
return 3;
}

With this modification it works well

function getVersion()
{
$version = phpversion();
$version = explode('.',$version);

if ( ($version[0]>4) ||($version[0] = 4 && $version[1] >= 1) ){
return 4;
} else {
return 3;
}


thanks for all
bye
Kerroch

  4. Re: test   Reply   Report abuse  
Picture of Mhyk Duterte Mhyk Duterte - 2005-07-13 08:33:56 - In reply to message 3 from Kerroch
The source file has been updated. Thanks Kerroch