PHP 的命令行模式

一、不加任何字符php

<?php ?>bash

運行結果: : command not foundon/promotion/promo_history_cron/delete_promo_now_db.php: line 1: : 沒有那個文件或目錄n/promotion/promo_history_cron/delete_promo_now_db.php: line 2: ?php /var/www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php: line 3: //: is a directory /var/www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php: line 4: //: is a directory : command not foundon/promotion/promo_history_cron/delete_promo_now_db.php: line 5: /var/www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php: line 6: include_once: command not found 2.加#!/usr/bin/php #!/usr/bin/phpit

<?php // 做業名:delete_promo_now_db.php // 介紹:刪除如今促銷庫中過時的數據 include_once 'inc/conf.inc';echo "dddd";exit; 運行結果: -bash: /var/www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php: /usr/bin/php^M: bad interpreter: 沒有那個文件或目錄 三、#!/usr/bin/php -q <?php // 做業名:delete_promo_now_db.php // 介紹:刪除如今促銷庫中過時的數據 include_once 'inc/conf.inc';echo "dddd";exit; 運行結果: Extension '/var/www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php' not present. 四、 #!/usr/bin/php -qd <?php // 做業名:delete_promo_now_db.php // 介紹:刪除如今促銷庫中過時的數據 include_once 'inc/conf.inc';echo "dddd";exit; 運行結果:PHP: Invalid configuration directive 五、 #!/usr/bin/php -qd open_basedir=/ <?php // 做業名:delete_promo_now_db.php // 介紹:刪除如今促銷庫中過時的數據 include_once 'inc/conf.inc';echo "dddd";exit; 運行結果: PHP Warning: include_once(inc/conf.inc): failed to open stream: Operation not permitted in /www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php on line 6 PHP Warning: include_once(): Failed opening 'inc/conf.inc' for inclusion (include_path='.:/var/www/dd_inc:/var/www/db:/php/includes:/usr/lib/php') in /www/project/cron/promotion/promo_history_cron/delete_promo_now_db.php on line 6 dddd 六、 /usr/bin/php -qd open_basedir=/ /var/www/project/cron/promotion/promo_history_cron/sync_promo_history.phpio

相關文章
相關標籤/搜索