shell 调用 php 循环执行
sh文件
sh文件
#!/bin/bash create_res=`php /www/wwwroot/ces.com/XX/1.php $1` if [[ "$create_res" = 1 ]]; then Echo_Green "create database $dbname ok." else Echo_Red "create database $dbname fail." fi
php文件代码
<?php header("Content-Type: text/html;charset=utf-8"); error_reporting(E_ALL | E_STRICT); echo $argv['1']; return;