PHP code example of pshentsoff / xhgui

1. Go to this page and download the library: Download pshentsoff/xhgui library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pshentsoff / xhgui example snippets


// In config/config.php
return array(
    // Other config
    'profiler.enable' => function() {
        $url = $_SERVER['REQUEST_URI'];
        if (strpos($url, '/blog') === 0) {
            return false;
        }
        return rand(1, 100) === 42;
    }
);

// In config/config.php
return array(
    // Other config
    'profiler.enable' => function() {
        return true;
    }
);

// In config/config.php
return array(
    // Other config
    'profile.simple_url' => function($url) {
        // Your code goes here.
    }
);

// In config/config.php
return array(
    //Other config
    'profiler.options' => [
        'ignored_functions' => ['call_user_func', 'call_user_func_array']
    ]
);
bash
   cd path/to/xhgui
   php install.php
   
nginx
server {
    listen   80;
    server_name example.com;

    # root directive should be global
    root   /var/www/example.com/public/xhgui/webroot/;
    index  index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;