note 78579 added to function.parse-ini-file
| From: | egingell at sisna dot com | Date: | Thu, 18 Oct 2007 03:11:22 +0000 |
| Subject: | note 78579 added to function.parse-ini-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131481@lists.php.net to get a copy of this message | ||
<?php
// Parse an INI formatted string. Requires read/write access to the filesystem.
function parse_ini_text ($text, $sections = false) {
$temp_dir = 'wherever that might be';
$prefix = 'whatever that might be';
$file = tempnam($temp_dir, $prefix); // File name should be as unique as possible to avoid
collisions.
$fp = fopen($file, 'w');
fwrite($fp, $text);
fclose($fp); // Required on windows or the next line may fail!
$ret = parse_ini_file($file, $sections);
unlink($file);
return $ret;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.35.195.81
----
Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php
Edit -- https://master.php.net/note/edit/78579
Del: integrated -- https://master.php.net/note/delete/78579/integrated
Del: useless -- https://master.php.net/note/delete/78579/useless
Del: bad code -- https://master.php.net/note/delete/78579/bad+code
Del: spam -- https://master.php.net/note/delete/78579/spam
Del: non-english -- https://master.php.net/note/delete/78579/non-english
Del: in docs -- https://master.php.net/note/delete/78579/in+docs
Del: other reasons-- https://master.php.net/note/delete/78579
Reject -- https://master.php.net/note/reject/78579
Search -- https://master.php.net/manage/user-notes.php