ABA


"עזרה בפתיחת קובץ ZIP ב PHP"
גירסת הדפסה        
קבוצות דיון בניית אתרים נושא #13388 מנהל    סגן המנהל    מפקח   Winner    צל"ש   מומחה  
אשכול מספר 13388
Elite Darkness

   20:23   23.12.07   
אל הפורום  
  עזרה בפתיחת קובץ ZIP ב PHP  
 
  
אז ככה יש לי קובץ ZIP שוקל 100 מגה העלתי אותו לתקייה הראשית באיחסון שלי , ואני רוצ העכשיו לפרוס אותו לאותה תקייה הבנתי שאפשר לעשות את זה בPHP מישהו יכול לעזור לי ולהגיד לי איך עושים את זה ?


                                שתף        
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

  האשכול     מחבר     תאריך כתיבה     מספר  
  כול כך נורא להשתמש בגוגל=] akoka 23.12.07 20:26 1
     תודה אני ינסה Elite Darkness 23.12.07 21:04 5
  מכתב Sn00py  23.12.07 20:41 3
     לא עובד Attempting to access a web site that contains Spyware! Elite Darkness 23.12.07 21:03 4
         ציטוט מהאתר: Rayman  23.12.07 21:36 6
             בכל הקוד יש include(''zip.lib.php''); מאיפה אני מביא אותו ? Elite Darkness 23.12.07 22:27 7
  עוד מישהו לא עובד כלום Elite Darkness 23.12.07 22:53 8
     בקיצור השרת שלך לא תומך בהרחבה של הZIP akoka 23.12.07 23:35 9
         איך אני יכול לדעת אם השרת תומך Elite Darkness 23.12.07 23:36 10
             תיצור קובץ עם הפונקציה phpinfo(); ותפתח אותו עם הדפדפן. MoonHunter 25.12.07 11:40 11

       
akoka

   20:26   23.12.07   
אל הפורום  
  1. כול כך נורא להשתמש בגוגל=]  
בתגובה להודעה מספר 0
 
   http://il.php.net/zip

ואל תשאל אותי איך משתמשים בזה כי אין לי מושג=]


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Elite Darkness

   21:04   23.12.07   
אל הפורום  
  5. תודה אני ינסה  
בתגובה להודעה מספר 1
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Sn00py 
חבר מתאריך 1.8.02
2954 הודעות
   20:41   23.12.07   
אל הפורום  
  3. מכתב  
בתגובה להודעה מספר 0
 
   http://oddsam.freehostia.com/Extractor/readme.txt

\x6C\x65\x65\x74\x68\x61\x78\x30
\x72\x3A\x2D\x29
tresp4sser


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Elite Darkness

   21:03   23.12.07   
אל הפורום  
  4. לא עובד Attempting to access a web site that contains Spyware!  
בתגובה להודעה מספר 3
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Rayman  לחץ כאן להצגת דירוג המשתמש
חבר מתאריך 2.7.02
61775 הודעות, 6 פידבק
   21:36   23.12.07   
אל הפורום  
  6. ציטוט מהאתר:  
בתגובה להודעה מספר 4
 
  

****

ZIP creation class
==

This class allows you to create ZIP archives on the
fly with local files or dynamical contents.

ZLIB extensions are not necessary, so this script is
compatible with most of the hosting services !

****

Important notes
===

Always think to the CHMOD under Linux, it's really
paining to answer those questions !

This class can be used without ZLIB extensions, but of
course archives can't be compressed, only grouped (that's
not so bad, whatever)

To create ZIP archives that can be read without ZLIB,
you must chose the lowest compressing level ("Stock"
with WinRAR) when creating the archive.

A good idea would be to try the sample script given
with the class (exemple.php).
In french (YOU translate, I always have to do)

*****

Class functions
===

Here is the list of functions and arguments :

Zip->get_List( )
-----------------------------

Returns an array of arrays :

+ => Extracted filename
+ => Archived filename
+ => Extracted file size
+ => Compressed file size
+ => CRC32 of the file (HEX)
+ => Date (Unix time)
+ => Comment, if present
+ => 0 for a file, 1 for a folder
+ => Index of the file (see extract)
+ => ok if the file isn't corrupted

### EXEMPLE :
> <?
> // Displays the contents of folder/archive.zip
> include("zip.lib.php");
> $zip = new Zip;
> print_r( $zip->get_List("folder/archive.zip") );
> ?>

Zip->Add( , )
----------------------------------------------------------------------------

Add files/folders to an archive.

The first argument is an array.

Each element of this array is an array itself, the first element is
the (folder/)name of the extracted file and the second the contents
of this file.

If the first element is a folder name only and if there isn't contents,
the folder will be created, but empty.

Subfolders are automatically created if they don't exist in the file
name.

The second argument of the function can enable or disable the file
compression. (1=enable, 0=disable)
This must be set to 0 if the ZLIB extensiosn are disabled.

Returns an array, indexes are file names and values are add status
(1 or 0)

To use archived files, you must use get_file()

### EXEMPLE :
> <?
> // Creates archive test.zip no compressed with <t.txt> and <folder/>
> include("zip.lib.php");
> $zip = new Zip;
> $zip->Add(Array(Array("t.txt","Text"),Array("folder/")),0);
> fputs(fopen("test.zip","wb"), $zip->get_file() ); // see get_file()
> ?>

Zip->get_file()
---------------

Very easy : returns a string of compressed files and folders that you
can use in files or send to the client with header("Content-Type...");

See exemple above.

Zip->extract( , , { Index } )
---------------------------------------------------------

Extract all or part of an archive.

is the (folder/)name of the archive you want
extract.

is the folder where files will be extracted.
Beware ! Permissions must be accessible for PHP !

{ Index } is an array of file indexes you want to
extract. Indexes are descripted in get_list().
If one of thoses index is -1 or if {index} is absent,
the whole archive is extracted

Subfolders are created automatically.

### EXEMPLE :
> <?
> // Extract files with index 1 & 3 to /files
> // and the whole archive to /archive
> include("zip.lib.php");
> $zip = new Zip;
> $zip->Extract("test.zip","files",Array(1,3));
> $zip->Extract("test.zip","archive",Array(-1));
> ?>

*****

Help and support
====

You don't understand one of theses functions
or you have any question ?

Go to the forum of maxg.info :
http://forum.maxg.info


****
Created by bouchon, http://maxg.info


תבלה




אני זה אני וטוב לי ככה כמו שאני

אני חושב על העתיד בשביל לחיות את ההוווה טוב יותר מהעבר...
ותגיד זמן והזמן עובר...
1995-2009


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Elite Darkness

   22:27   23.12.07   
אל הפורום  
  7. בכל הקוד יש include(''zip.lib.php''); מאיפה אני מביא אותו ?  
בתגובה להודעה מספר 6
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Elite Darkness

   22:53   23.12.07   
אל הפורום  
  8. עוד מישהו לא עובד כלום  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
akoka

   23:35   23.12.07   
אל הפורום  
  9. בקיצור השרת שלך לא תומך בהרחבה של הZIP  
בתגובה להודעה מספר 8
 
   הלינק שנתתי לך יעבוד רק אם ההרחבה מותקנת:|


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Elite Darkness

   23:36   23.12.07   
אל הפורום  
  10. איך אני יכול לדעת אם השרת תומך  
בתגובה להודעה מספר 9
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
MoonHunter
חבר מתאריך 1.8.02
680 הודעות
   11:40   25.12.07   
אל הפורום  
  11. תיצור קובץ עם הפונקציה phpinfo(); ותפתח אותו עם הדפדפן.  
בתגובה להודעה מספר 10
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

תגובה מהירה  למכתב מספר: 
 
___________________________________________________________________

___________________________________________________________________
למנהלים:  נעל | תייק בארכיון | מחק | העבר לפורום אחר | מחק תגובות | עגן אשכול
       



© כל הזכויות שמורות ל-רוטר.נט בע"מ rotter.net