使用exec执行命令
<?php
$id = 5;
$info = 'cd /usr/script && ./delete.pl '.$id ;#传值
exec($info,$output,$re);
?>
delete.pl:
my $id = $ARGV[0];#获取传来的值
my $sql = 'delete from user where id = ?';
if( &ning_mysql::mysql_execute($sql , undef))
{
print "ERROR:SQL:".$sql."执行失败\n";
&ning_mysql::mysql_close;
exit 1;
}