I want to create a weekly backup of my project directory in PHP. I need help to create a password protected zip file in php. I use the below function, but that not create a whole folder backup as well as not helping for password protected.
$path = realpath('');
$files = glob($path.'*');
$files = $files[0];
$password = "test';
@system('zip -P $password'.$filename.' '.$files);