etrader Posted July 27, 2011 Share Posted July 27, 2011 I am on Ubuntu server and have installed unrar-free. In SSH I can successfully unrar with commands like $ unrar e file.rar but how I can unrar in php? DO need to install unrar for php? because I was not able to run commands introduce in php.net Link to comment https://forums.phpfreaks.com/topic/242982-unrar-in-php/ Share on other sites More sharing options...
gristoi Posted July 27, 2011 Share Posted July 27, 2011 did you try $rar = rar_open('path/to/rar/file.rar'); Link to comment https://forums.phpfreaks.com/topic/242982-unrar-in-php/#findComment-1248018 Share on other sites More sharing options...
etrader Posted July 27, 2011 Author Share Posted July 27, 2011 No, I cannot run rar_open(), but I can unrar in php by this command $string='unrar e -y /path/to/file'; exec($string); My issue is that I am looking for a way to put the name of rar file in the unrared files. For example: file.rar containing ebooks; I want to unrar it to file-ebook1.pdf file-ebook2.pdf .... Link to comment https://forums.phpfreaks.com/topic/242982-unrar-in-php/#findComment-1248029 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.