Jump to content

PHP & unrar problem, please help


dima1236

Recommended Posts

Hello Guys,

I am trying to make an PHP script that will scan for folders with RAR files and extract them

the code i came up so far is :

$files=read_folder_directory($fullpath);
foreach ($files as $key => $value)  {
	echo $key;
	echo "<br />";
	natsort($value);
	foreach($value as $file) {
		//echo $file;
		 echo "$fullpath/$key/$file";
		 echo "<br />";
			echo $string='unrar e -y'."$fullpath/$key/$file $fullpath/$key/";
			echo $exec = exec($string);
			echo "<br />";

	}
}

 

now if i paste $string output into shell, it does goes and unrar perfectly fine, however $exec returns : No files to extract, any ideas on what is wrong ?

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/239080-php-unrar-problem-please-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.