久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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文件

      如何禁止別人直接訪問php文件

      如何禁止別人直接訪問php文件

      可以通過判斷某一個(gè)常量是否被定義或定義的值是否相同,如果未被定義或值不相同則停止腳本運(yùn)行。

      defined('IS_ALLOW') or die('禁止訪問!');

      訪問結(jié)果:禁止訪問!

      如果需要在其它php文件中進(jìn)行引用,可以先將常量定義后在進(jìn)行引用。

      A.php

      defined('IS_ALLOW') or die('禁止');  echo "訪問成功!";

      B.php

      define('IS_ALLOW', true);  require './A.php';

      訪問B.php結(jié)果:訪問成功!

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