note 88378 added to rar.examples
| From: | landavia81 at gmail dot com | Date: | Wed, 21 Jan 2009 18:00:09 +0000 |
| Subject: | note 88378 added to rar.examples | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149606@lists.php.net to get a copy of this message | ||
for unknown reason.. many programer has problem with php_rar (in windows).. i came up with this ...
and it work.
basicly is same as above but only extract only. The problem will come up if the file rar corrupt,
exist and soon
_______________________________
<?php
$appRar ="C:/Program Files/WinRAR/unrar.exe";
#this is false..
$appRar = '"C:\Program Files\WinRAR\unrar.exe"';
#change this
$opt="e";
$target="1.rar";
$do ="$appRar $opt $target";
exec($do,$aOut);
print_r($aOut);
?>
-------------------------------------------------
For windows user: try using bat file for test.
all user: please read man unrar, above using e because this only extract. But you should notice
about other option like "y","x", etc
i type the option here if you too lazy
http://landavia.multiply.com/journal/item/284/option_for_unrar
$aOut are array for the output after you run the script $do
----
Server IP: 202.158.52.162
Probable Submitter: 118.137.53.250
----
Manual Page -- http://www.php.net/manual/en/rar.examples.php
Edit -- https://master.php.net/note/edit/88378
Del: integrated -- https://master.php.net/note/delete/88378/integrated
Del: useless -- https://master.php.net/note/delete/88378/useless
Del: bad code -- https://master.php.net/note/delete/88378/bad+code
Del: spam -- https://master.php.net/note/delete/88378/spam
Del: non-english -- https://master.php.net/note/delete/88378/non-english
Del: in docs -- https://master.php.net/note/delete/88378/in+docs
Del: other reasons-- https://master.php.net/note/delete/88378
Reject -- https://master.php.net/note/reject/88378
Search -- https://master.php.net/manage/user-notes.php