Home >Backend Development >PHP Tutorial >PHP executes external commands with backtick_PHP tutorial
For example:
echo `whoami`;
// Export the database, the folder to be imported must have writable permissions, and the content after -u -p must be written immediately
The code is as follows:
Other uses of backticks
3
|
#Use a backtick to imply execution as a command
$result=`date`; the server timestamp is: $result "; echo ""; #Use shell_exec() $result1=shell_exec("date"); echo " the server timestamp is: $result1 "; ?> |