最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

php命令行使用方法和命令行參數(shù)說明

 更新時間:2014年04月08日 09:39:25   作者:  
這篇文章主要介紹了php命令行使用方法和命令行參數(shù)說明,需要的朋友可以參考下

復(fù)制代碼 代碼如下:

[root@localhost /]#
[root@localhost /]# php -r "var_dump(true);"  # 執(zhí)行PHP代碼 不需要 <?php ... ?> 標簽
bool(true)
[root@localhost /]# php -R "var_dump(true);"  # 執(zhí)行PHP代碼 每一個輸入行

bool(true)

bool(true)

bool(true)
[root@localhost /]#
[root@localhost /]# php -f "file" # 執(zhí)行php代碼 來自文件
[root@localhost /]# 
[root@localhost /]# php "test.php" id name sex
int(4)
Array
(
    [0] => test.php
    [1] => id
    [2] => name
    [3] => sex
)
[root@localhost /]#
[root@localhost /]# cat test.php
<?php

var_dump($_SERVER["argc"]); // 獲取命令行傳入?yún)?shù)的數(shù)量
print_r($_SERVER["argv"]); // 獲取命令行傳入?yún)?shù)的數(shù)組

[root@localhost /]#

相關(guān)文章

最新評論

鹰潭市| 陇南市| 黄大仙区| 思茅市| 罗山县| 若羌县| 潢川县| 威远县| 普安县| 个旧市| 邻水| 曲麻莱县| 手机| 香格里拉县| 沙湾县| 平遥县| 宝坻区| 论坛| 靖州| 新晃| 开阳县| 崇左市| 上饶县| 诸城市| 北票市| 白银市| 石渠县| 自贡市| 鄂托克前旗| 大洼县| 柞水县| 修水县| 临桂县| 石渠县| 呼伦贝尔市| 皮山县| 资兴市| 大连市| 汉中市| 望奎县| 苍溪县|