Home > Article > Backend Development > PHP uses a backtick (`, that is, the one under the ESC key on the keyboard, which is the same as ~) to execute external commands
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
echo `mysqldump -h localhost -u$DbUser -p$DbPwd --default-character-set=utf8 $DbName > /var/$dumpFileName`;
The above introduces how PHP uses the backtick (`, which is the one under the ESC key on the keyboard, and it is the same as ~) to execute external commands, including some aspects. I hope it will be helpful to friends who are interested in PHP tutorials. .