你會認爲我應該在Google上找到這個,但是我不知道。從PHP中的config.ini中讀取值
的config.ini
[ENVIRONMENT]
env = prod
js_path = js/
css_path = css/
;host= www.xxxxxxxx.com
host=http://localhost:8080/home
test = 0
我需要閱讀主機這裏的值:
<?php
header('Location: ?????????????????');
echo 'Thank you for contacting us. We will be in touch with you very soon.';
}
?>
有誰知道?
檢查['parse_ini_file()'](http://php.net/manual/en/function.parse-ini-file.php) – pNre
真的嗎?谷歌'讀取ini文件',第一個鏈接... –
我認爲你只是懶惰地使用谷歌:https://www.google.com/search?q=reading%20values%20from%20config.ini%20in %20PHP。只是搜索你的標題。 – idmean