linux – 7z installed on ubuntu but 7z command not run with exec() function in php application-ThrowExceptions

Exception or error:

How can 7z command run on php application in local system? I am trying to extract
zip (7z) file inside php application. Below code run on live server successfully but not on local linux system.
How can I run 7z unzip command in my php application?

My existing code is-

exec("7z x fileToUnzip.7z -o/opt/lampp/htdocs/"%MyProject/unzipFolder%" -p$pass");
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *