Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
problem with zip file with php
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 10-07-2009, 09:55 AM
fighter1431's Avatar
Forum Addict
 
Join Date: Feb 2007
Posts: 418
Default problem with zip file with php

I haev some problems with the code for my website that is suppossed to extract a zipfile and then put al lthe names of the entries in a mysql databse.

Could someone please tell me what I did wrong and correct this code?

Code:
       elseif ($_POST['nieuwefotosubmit']) {

               $file = $_FILES['file']['name'];
               $fileplaats = "fotos/".$file;

               $target_path = "fotos/";
               $target_path = $target_path . basename( $_FILES['file']['name']);
               $move1=move_uploaded_file($_FILES['file']['tmp_name'], $target_path);
               $error = $_FILES['file']['error'];

               if (!$move1) {
                       $content = "Het is niet gelukt om ".$file." te uploaden <br
/>".$error."<br />";
               } else {
                       $content .= "Het is gelukt om ".$file." te uploaden.<br />";
               }

               if(!$include=include_once("pclzip.lib.php")) {
                       die('Error'.$include->errorInfo(true));
               }
               $zip =  new PclZip($fileplaats);
               if (($lijst = $zip->listContent()) == 0)
               die ('Error '.$zip->errorInfo(true));

               $i = 0;
               while ($i < sizeof($lijst)) {

                       $naam = $lijst[$i]['filename'];
               $fotograaf = $login;
                       $comment = "";
                       $query200 = mysql_query("INSERT INTO fotos (naam, date, comment,
fotograaf) VALUES ('$naam', '$date', '$comments', '$login')");

                       $error = mysql_error();

                       if (!$query200) {$content = $error;}

               }
       }
thx in andvance

fighter1431
__________________


msn=[email protected]
Reply With Quote
  #2  
Old 10-12-2009, 11:08 PM
Active Member
 
Join Date: Apr 2008
Posts: 146
Default Re: problem with zip file with php

What error does PHP produce when you attempt to run this?

Looks like you just cut this section out of something bigger..
Reply With Quote
  #3  
Old 11-19-2011, 04:13 PM
sp for real's Avatar
Member
 
Join Date: Nov 2011
Posts: 74
Default Re: problem with zip file with php

http://php.net/manual/en/book.zip.php

go there and learn to write a better script asap.

or use something like phpmyadmin and import the data
__________________
HTML5 / CSS3 / XML / JavaScript / AJAX / DOM / VB / DHTML
mySQL / PHP / ASP / PYTHON / PERL / RAZOR / ADO

PROFESSIONAL /SEO / SMO / SEM / EXPERIENCED
What ya need?
** REQUESTS MUST BE PM'ed AND CONTAIN A GENERAL DESCRIPTION OF PROJECT **
** FAILURE TO DO SO WILL RESULT WITH A VMF REPLY **

Last edited by sp for real : 11-19-2011 at 04:19 PM.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 08:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1