脚本宝典收集整理的这篇文章主要介绍了drupal – 脚本开始使用drush php-script在ctrl c后不会退出,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
$ITer = 1; while( $iter <= 50 ){ echo "iteration no ". $iter ."\n"; $iter++; sleep( 1 ); }
这是我运行它的命令:
$drush PHP-script userstest.PHP
当我按下CTRL C时,drush命令停止,但PHP脚本继续运行.
以下是它的外观:
$drush PHP-script userstest.PHP iteration no 1 iteration no 2 iteration no 3 $iteration no 4 iteration no 5 iteration no 6 iteration no 7 ^C $iteration no 8 iteration no 9 iteration no 10 iteration no 11 ^C $iteration no 12 iteration no 13 iteration no 14 iteration no 15
它一直持续到PHP脚本实际完成.
我怎么能停止脚本?
以上是脚本宝典为你收集整理的drupal – 脚本开始使用drush php-script在ctrl c后不会退出全部内容,希望文章能够帮你解决drupal – 脚本开始使用drush php-script在ctrl c后不会退出所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。