i try to run a command in server from php so i added this code in a php file
shell_exec($cmd);
echo $cmd = "at ".$_POST['time1']." <<< '/usr/local/bin/youtube-dl ".$_POST['url']." -o ".$out." && /root/bin/ffmpeg -y -i ".$out." -c:v libx264 -s 640x360 -b:v 300k -strict experimental -movflags +faststart -c:a aac FILMA/".$out."___www.example.com___.mp4 && rm -f ".$out."'";
When i run it i get this error
PHP Notice: Undefined variable: cmd in /var/www/html/1.php on line __, referer: http://example.com/1.php
The problem is you are attempting to use $cmd
before you have defined it. You use it on line 1 and define it on line 3.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments