PHP uses a backtick (`, that is, the one under the ESC key on the keyboard, which is the same as ~) to execute external commands

WBOY
Release: 2016-08-08 09:26:08
Original
1323 people have browsed it

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. .

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!