久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php require_once怎么用

      在php中,require_once語句用于引用或包含外部的一個php文件,語法“require_once(filename)”或“require_once 'filename'”;如果該語句指定的文件已經(jīng)被包含過,則不會再次包含。

      php require_once怎么用

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版、DELL G3電腦

      php require_once語句

      require_once:它的作用與 require 的作用是一樣的,都是引用或包含外部的一個php文件

      原理:當含有 require_once 的php文件被執(zhí)行時,則被 require_once 指定的外部文件都會包含進來,與其它的代碼組成一個新的 php 文件,并開始執(zhí)行

      語法:“require_once(filename)”或“require_once 'filename'”

      注意:

      1、當外部的被包含進來的文件有錯誤時,也會跑錯,并終止運行

      2、在應用 require_once 語句時會先檢查要包含的文件是不是已經(jīng)在該程序中的其他地方被包含過,如果有,則不會再次重復包含該文件。

      示例:

      a.php

      <?php  echo "Hello"; ?>

      b.php

      <?php     require 'a.php';     require_once 'a.php'; ?>

      運行 b.php 的結果為:

      Hello

      注:結果只輸出了一個 Hello ,說明 a.php 里面的代碼只被引用了一次。

      推薦學習:《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號