動態改變系統ini配置-談php4裡的一些新函數_PHP教程

來源:互聯網
上載者:User
這些函數為
ini_alter — 改變更配置置參數值
ini_get — 獲得配置參數值
ini_restore — 恢複原始配置參數值
ini_set — 設定配置參數值
例如獲得 include 路徑可以用
print(ini_get("include_path"));
ini_set("include_path","f:");
print(ini_get("include_path"));
ini_restore("include_path");
print(ini_get("include_path"));
ini_set("include_path","f:php2000");
print(ini_get("include_path"));
?>
輸出為(我加上了換行以便於比較)
f:php2000
f:
f:
f:php2000
不知道為何 restore 錯誤??? ???
這樣我們可以在程式裡面隨時改變參數配置值,同時我發現,在再次執行時,系統的預設參數沒有改變,也就是說,改變僅限於當前指令碼運行期間。

http://www.bkjia.com/PHPjc/532117.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532117.htmlTechArticle這些函數為 ini_alter — 改變更配置置參數值 ini_get — 獲得配置參數值 ini_restore — 恢複原始配置參數值 ini_set — 設定配置參數值 例如獲得 inc...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.