代码如下:
echo `mysqldump -h localhost -u$DbUser -p$DbPwd --default-character-set=utf8 $DbName > /var/$dumpFileName`;
反撇号其他用法
<?php
#使用反撇号,暗示作为命令来执行
$result=`date`;
echo "<p>the server timestamp is: $result</p>";
echo "<hr color=red>";
#使用shell_exec()
$result1=shell_exec("date");
echo "<p>the server timestamp is: $result1</p><div class="aritcle_card flexRow">
<div class="artcardd flexRow">
<a class="aritcle_card_img" href="/ai/2405" title="大师兄智慧家政"><img
src="https://img.php.cn/upload/ai_manual/001/246/273/176395441542705.png" alt="大师兄智慧家政" onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a>
<div class="aritcle_card_info flexColumn">
<a href="/ai/2405" title="大师兄智慧家政">大师兄智慧家政</a>
<p>58到家打造的AI智能营销工具</p>
</div>
<a href="/ai/2405" title="大师兄智慧家政" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
</div>
</div>";
?>
输出结果如下:
the server timestamp is: 当前日期: 2009/06/30 二输入新日期: (年月日)
以上所述就是本文的全部内容了,希望大家能够喜欢。
立即学习“PHP免费学习笔记(深入)”;










