hi all How can I unrar one file.rar on PHP. My OS is Linux, I installed Unrar soft on linux and test it by command: mc unrar e customer.zar . Beside that I have set permission RW for the file. But when I run the code bellow it did not unrar customer.rar eventhough there is not any error. So is there anything to do or configuration before I run the code? : <?php $rar_file = rar_open('/var/www/html/assets/upload/customer.rar'); if ($rar_file) { $entry = rar_entry_get($rar_file,$filename) or die("Failed to find such entry"); $entry->extract("."); rar_close($rar_file); } ?> When I run the code, It say nothing but didnot unrar file customer.rar. Why? Please help me.
the rar extension is buggy at best not to mention it behaves differently in both linux and windows which i found out the hard way. Wheres the $filename variable coming from ?