PHP用反撇号(`也便是键盘上ESC键下面的那个,和~在同一个上面)执行外部命令

WBOY
Release: 2016-06-13 12:17:48
Original
1013 people have browsed it

PHP用反撇号(`,也就是键盘上ESC键下面的那个,和~在同一个上面)执行外部命令

例如:

echo `whoami`;

// 导出数据库,要导入的文件夹必须要有可写权限, -u -p之后的内容必须要紧挨着写

echo `mysqldump -h localhost -u$DbUser -p$DbPwd --default-character-set=utf8 $DbName > /var/$dumpFileName`;

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!