Show Config

  • I'm not sure if this will help anybody else, or even if something like this already exists but…if its worth something, great!

    I needed to see the pfsense config, not as it is in the xml file, but as constructed in the php array -- since my dull mind can't correspond the two in certain situations.  So, I wrote the below php in your /usr/local/www, browse to it, and enjoy.  You'll need to view source to see the white space formatting since it gives you clean text, not html.

    function print_arr($array, $prefix = ''){
    	foreach($array as $key => $val){
    		$output = $prefix . $key . "=>";
    			$output .= $val;
    		$output .= "\n";
    		print $output;
    			print_arr($val, $prefix . "\t");

Log in to reply