Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Show Config

    Development
    1
    1
    1418
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thekod last edited by

      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 file...place 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.

      include('auth.inc');
      include('config.inc');
      function print_arr($array, $prefix = ''){
      	foreach($array as $key => $val){
      		$output = $prefix . $key . "=>";
      		if(!is_array($val))
      			$output .= $val;
      		$output .= "\n";
      		print $output;
      		if(is_array($val))
      			print_arr($val, $prefix . "\t");
      	}
      }
      print_arr($config);
      ?>
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post