note 50155 added to function.phpinfo

From: Date: Sun, 20 Feb 2005 04:12:20 +0000
Subject: note 50155 added to function.phpinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-85260@lists.php.net to get a copy of this message
This is a horrible hack to get the current php config file, I wish there was a better way <?PHP function GetConfigFile() { ob_start(); phpinfo(INFO_GENERAL); $info = ob_get_clean(); preg_match('/\<tr\>\<td class\="e"\>Configuration File \(php\.ini\) Path \<\/td\>\<td class\="v"\>(.*?)\<\/td\>\<\/tr\>/', $info, $match); return trim($match[1]); } ?> -- www.spacevs.com ---- Manual Page -- http://www.php.net/manual/en/function.phpinfo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50155 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50155&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50155&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50155&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50155&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50155&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50155&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85260) next »