[PHP] Unzippen via PHP zonder zlib library

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

  • vorlox
  • Registratie: Juni 2001
  • Laatst online: 02-02-2022

vorlox

I cna ytpe 300 wrods pre miute

Topicstarter
Beste Allemaal,

Ik zit effe met een vreemd probleempje.
Ik draai op mijn webserver een script welke een mailtje ophaalt met daarin een zip file.

Lukt allemaal prima.
Ik plaats de zipfile in een temp dir en dan wil ik hem uitpakken

Dit doe ik met
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
            $CountAttachments = count($EMAIL->attachments);
            for($ii=0; $ii<$CountAttachments; $ii++)
            {
                
                echo $EMAIL->attachments[$ii]."<BR>";
                
                $SystemCommand = "unzip export/mail_attachments/".$EMAIL->attachments[$ii]."";
                echo $SystemCommand."<BR>";
                $Lines = system($SystemCommand,$retval);
                
                echo "Lines ".$Lines."<BR>";
                echo "retval ".$retval."<BR>";

                
            } //Endfor($ii=0; $ii<$CountAttachments; $ii++)


nu heb ik geen mogelijk om onder deze linux machine dus die zip lib te installeren
maar dit moet toch gaan
het zippen doe ik ook zo
ik krijg geen foutmelding terug al print ik de retval e.d

iemand een suggestie

Acties:
  • 0 Henk 'm!

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 09-09 13:58

NMe

Quia Ego Sic Dico.

Probeer eens het volle pad naar unzip op te geven? Bijvoorbeeld /usr/bin/ of /usr/local/bin/

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


Acties:
  • 0 Henk 'm!

  • vorlox
  • Registratie: Juni 2001
  • Laatst online: 02-02-2022

vorlox

I cna ytpe 300 wrods pre miute

Topicstarter
Waaat dit had ik toch geprobeerd?????

Je bent geweldig...dit is te makkelijk... _/-\o_

PHP:
1
                $SystemCommand = "/usr/bin/unzip /home/httpd/vhosts/intratest.medeco.nl/httpdocs/export/mail_attachments/".$EMAIL->attachments[$ii]."";


Waarschijnlijk typo gemaakt want het werkt ..
Super bedankt...draadje kan dicht