note 100594 added to function.parse-ini-string
| From: | (safakozpinar@gmail.com) | Date: | Mon, 25 Oct 2010 21:20:18 +0000 |
| Subject: | note 100594 added to function.parse-ini-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173452@lists.php.net to get a copy of this message | ||
Function parse_ini_file doesn't parse a remote ini file if allow_url_include is off. But if
allow_url_fopen is on, you can use parse_ini_string to parse a remote ini file after read its
contents.
<?php
/**
* Assume that; allow_url_include=0 and allow_url_fopen=1
* (default values in php.ini)
*/
$iniUrl = 'http://computername/remote/config.ini';
/**
* Warning: parse_ini_file(): http:// wrapper is disabled in the server
configuration by allow_url_include=0
*/
$config = parse_ini_file($iniUrl);
/**
* works fine
*/
$config = parse_ini_string(file_get_contents($iniUrl));
?>
----
Server IP: 69.147.83.197
Probable Submitter: 78.185.17.50
----
Manual Page -- http://www.php.net/manual/en/function.parse-ini-string.php
Edit -- https://master.php.net/note/edit/100594
Del: integrated -- https://master.php.net/note/delete/100594/integrated
Del: useless -- https://master.php.net/note/delete/100594/useless
Del: bad code -- https://master.php.net/note/delete/100594/bad+code
Del: spam -- https://master.php.net/note/delete/100594/spam
Del: non-english -- https://master.php.net/note/delete/100594/non-english
Del: in docs -- https://master.php.net/note/delete/100594/in+docs
Del: other reasons-- https://master.php.net/note/delete/100594
Reject -- https://master.php.net/note/reject/100594
Search -- https://master.php.net/manage/user-notes.php