Professional Web Applications Themes

zip uploaded files - PHP Development

hi, i've a problem to zip files which are uploaded to the server. (include the class zip.lib.php from phpMyAdmin) require("inc/zip.lib.php"); $zipfile = new zipfile(); //add the uploaded file to the server (i know that this is not the temp //name of the file, so in this case, i would have a zipped and a unzipped //file on the server) $zipfile->addFile("$upload_path/$uploaded_file", "myZip.zip"); $filezipped = $zipfile->file(); //now copy the zipped file to the right directory copy($filezipped,"$current_dir/$uploaded_file.zip"); i always get a "copy(./PK) [function.copy]: failed to create stream: No such file or directory in /srv/.../zip.php on line 695" error." - but the file should ...

  1. #1

    Default zip uploaded files

    hi,
    i've a problem to zip files which are uploaded to the server.
    (include the class zip.lib.php from phpMyAdmin)

    require("inc/zip.lib.php");
    $zipfile = new zipfile();
    //add the uploaded file to the server (i know that this is not the
    temp
    //name of the file, so in this case, i would have a zipped and a
    unzipped
    //file on the server)
    $zipfile->addFile("$upload_path/$uploaded_file", "myZip.zip");
    $filezipped = $zipfile->file();

    //now copy the zipped file to the right directory
    copy($filezipped,"$current_dir/$uploaded_file.zip");


    i always get a "copy(./PK) [function.copy]: failed to create
    stream: No such file or directory in /srv/.../zip.php on line 695"
    error." - but the file should be zipped an there, becauce if i made a
    "echo $filezipped", i get a result!
    can anybody help me?
    Andrea Stein Guest

  2. #2

    Default Re: zip uploaded files

    [email]tryagaingmx.ch[/email] (Andrea Stein) wrote in message news:<cca1819c.0307070247.2351f51aposting.google. com>...
    > //now copy the zipped file to the right directory
    > copy($filezipped,"$current_dir/$uploaded_file.zip");
    You may use move_uploaded_file(). The path to the file should be
    "/home/public_html/myfolder/file.zip" & there should be proper rights
    to that folder

    ---
    "I have a dream that one day girls will be measured by the size of
    their brains than the shape of their flush"
    Email: rrjanbiah-at-Y!com
    R. Rajesh Jeba Anbiah Guest

Similar Threads

  1. MIME type of uploaded files
    By chonny in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 23rd, 10:41 AM
  2. Converting uploaded files to FlashPaper w/CFMX 7?
    By smittyPixel in forum Coldfusion Flash Integration
    Replies: 2
    Last Post: May 17th, 09:51 PM
  3. Mail Uploaded Files
    By Andy in forum Dreamweaver AppDev
    Replies: 0
    Last Post: May 16th, 02:40 PM
  4. Removing uploaded files
    By eNJayBe in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: April 14th, 06:36 PM
  5. problem with moving uploaded files
    By James Jiao in forum PHP Development
    Replies: 1
    Last Post: August 29th, 12:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139