Re: two confuse problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



EVEL_LIU@xxxxxxxxxxx wrote:

1,Click the brows bottom, and select one file, return the file name to the text area and the file¡¦s size to the $filesize.

> I don¡¦t how to make the browser bottom to achieve that.?


PHP can't help you with that. When a person selects a file in a file
upload form widget, everything is taking place on the client side.
Additionally, file upload widgets have restrictions with regard to
Javascript for security reasons. And the size of the selected file cannot be known until it is uploaded to the server. You can see it in $_FILES['your_form_field_name']['size'].

See the manual page for uploads:
http://www.php.net/manual/en/features.file-upload.php


2,use the zip_read function of the PHP: ¡]because most of the file type is *.zip and *.doc¡^

...

Warning: zip_read() expects parameter 1 to be resource, integer given
 in D:\www¡Kon line 6


Check the manual:
http://www.php.net/zip_open

--snip--
Return Values

Returns a resource handle for later use with zip_read() and zip_close()
or returns the number of error if filename does not exist or in case of
other error.
--snip--

So, zip_open() is not opening the file and is returning an error code.
See the comment by "saulius at solmetra dot lt" on that page for
instructions for dealing with errors.

brian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux