vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Phpinfo() and Global Vars (https://vborg.vbsupport.ru/showthread.php?t=35941)

Jawelin 03-10-2002 10:35 AM

Phpinfo() and Global Vars
 
How could I read all (each one) the vars displayed in phpinfo() ?
I found somewhere the reference to one or another .... but can't understand the exact difference between global var series.
Most of all, where find a complete reference of each global var accessible via PHP code (and hopefully echoable ... :pleased: ) Could I even redirect the output of phpinfo(parameter), for example ?

Note: I've already checked the PHP Manual: Predefined variables page, but it isn't complete, as itself said
Quote:

Note: This list is neither exhaustive nor intended to be. It is simply a guideline as to what sorts of predefined variables you can expect to have access to in your script.
Even I got almost confused by the VBulletin management of those vars. Sometimes some are accessed by getenv() function, sometimes directly via a $HTTP_var constant.
What's the difference ???

Thanks

Bye

TECK 03-10-2002 10:41 AM

http://www.php.net/manual/en/function.phpinfo.php

example: phpinfo(2) will show you only the credits. ;)

Admin 03-10-2002 10:42 AM

To capture the output of phpinfo():
Code:

        ob_start();
        phpinfo();
        $phpinfo = ob_get_contents();
        ob_end_clean();


Jawelin 03-10-2002 10:47 AM

Quote:

Originally posted by nakkid
http://www.php.net/manual/en/function.phpinfo.php

example: phpinfo(2) will show you only the credits. ;)

Thanks, Nakkid. But I wouldn't only be shown that page. For instance, I would use one by one those vars...

Thanks even to FF. Is this the usual PHP redirection method into an object ?

Bye

P.S.: I updated my original request with some more info, meanwhile...

Admin 03-10-2002 10:51 AM

It's called Output Buffering or Controlled Output, it's used to capture the output from going to the browser so you can do stuff with it.

Mark Hensler 03-10-2002 06:28 PM

Quote:

Originally posted by Jawelin
Even I got almost confused by the VBulletin management of those vars. Sometimes some are accessed by getenv() function, sometimes directly via a $HTTP_var constant.
What's the difference ???

Most of those vars can be accessed directly by using $HTTP_XXXXX. But to access those vars in a function, you need to use getenv("HTTP_XXXXX") or $GLOBALS["HTTP_XXXXX"], or declare them as global in the function.

Jawelin 03-10-2002 09:02 PM

Yes, thanks.
But what are the differences between ( in phpinfo() ):
- Apache variables
- Http header infos
- Php vars
and how each group of them could be accessed by php ?
(I mean with a $.... or associative array...)

Thanks again


All times are GMT. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01025 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete