av手机免费在线观看,国产女人在线视频,国产xxxx免费,捆绑调教一二三区,97影院最新理论片,色之久久综合,国产精品日韩欧美一区二区三区

PHP

php命令行使用方法和命令行參數(shù)有哪些

時(shí)間:2024-09-18 08:51:40 PHP 我要投稿
  • 相關(guān)推薦

php命令行使用方法和命令行參數(shù)有哪些

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

  [root@localhost /]#

  [root@localhost /]# php -r "var_dump(true);" # 執(zhí)行PHP代碼 不需要 標(biāo)簽

  bool(true)

  [root@localhost /]# php -R "var_dump(true);" # 執(zhí)行PHP代碼 每一個(gè)輸入行

  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 /]#

【php命令行使用方法和命令行參數(shù)有哪些】相關(guān)文章:

三級(jí)PC常見的系統(tǒng)命令行07-19

柔膚水的作用和使用方法09-05

膠州秧歌和東北秧歌有哪些區(qū)別02-10

滑雪前的準(zhǔn)備和注意事項(xiàng)有哪些02-06

英語演講技巧和注意事項(xiàng)有哪些05-20

公衛(wèi)執(zhí)業(yè)醫(yī)師考點(diǎn):毒性參數(shù)和安全限值01-11

舞蹈的種類有哪些05-20

徽菜有哪些做法07-16

立冬習(xí)俗有哪些11-07

婚姻感悟有哪些04-05