mixed wb_get_system_info (string info)
Returns information about the current system and application, according to the string info. The parameter info is case-insensitive.
The available values of info are in the table below.
| info | Meaning | Type | Example |
|---|---|---|---|
| "appmemory" | The total memory used by the application | integer | 20090 |
| "commandline" | The original Windows command line including the executable file | string | C:\PHP\PHP5\php.exe C:\PHP\code\test.phpw |
| "computername" | The name of the computer inside the network | string | PICASSO |
| "consolemode" | 1 indicates that console mode (DOS box) is active, 0 otherwise | integer | 0 |
| "diskdrives" | The list of all available disk drives | string | A: C: D: E: |
| "exepath" | The path to the main executable (PHP.EXE) | string | C:\PHP\PHP5\ |
| "extensionpath" | The path to the current PHP extension | string | C:\PHP\PHP5\ext\ |
| "fontpath" | The current font path | string | C:\Windows\Fonts\ |
| "freememory" | The available physical memory | integer | 71950336 |
| "gdiobjects" | The number of currently allocated GDI handles | integer | 25 |
| "instance" | The instance identifier of the current application | integer | 4194304 |
| "ospath" | The current OS path | string | C:\Windows\ |
| "osversion" | The complete OS version name | string | Microsoft Windows XP Home Edition Service Pack 2 (build 2600) |
| "osnumber" | The numeric OS version number | string | 5.1 |
| "pgmpath" | The default OS application path | string | C:\Program Files\ |
| "screenarea" | The total area (x, y, width, height) of the screen, in pixels | string | 0 0 1280 960 |
| "systemfont" | The common (default) system font for dialog boxes | string | Tahoma 8 Regular |
| "systempath" | The OS system path | string | C:\Windows\System\ |
| "temppath" | The path used by the OS to hold temporary files | string | C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ |
| "totalmemory" | The total physical memory installed | string | 200785920 |
| "username" | The name of the currently logged user | string | Admin |
| "userobjects" | The number of currently allocated USER handles | integer | 7 |
| "workarea" | The valid area (x, y, width, height) of the screen, in pixels | string | 0 0 1280 926 |
If info is not one of the above values, a warning message will be displayed and the function will return NULL.
In certain cases where the return value is a string with several sub-strings, use the explode() function to separate values. Examples:
// Get font data values
$sfnt = explode(" ", wb_get_system_info("systemfont"));
$sysfont = wb_create_font($sfnt[0], $sfnt[1], BLACK, constant(strtoupper("FTA_$sfnt[2]")));
// Get screen dimensions
$dim = explode(" ", wb_get_system_info("screenarea"));
wb_message_box(null, "Screen dimensions are $dim[2] x $dim[3] pixels.");