PHP code example of jelix / fakeserverconf

1. Go to this page and download the library: Download jelix/fakeserverconf 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/ */

    

jelix / fakeserverconf example snippets


    // let's says we are running an Apache server configured with mod_php.
    // Indicate to this server the script name (it can be hidden in the http request)
    $server = new \Jelix\FakeServerConf\ApacheMod(null, '/info.php');
    
    // now simulate an HTTP request
    $server->setHttpRequest('http://testapp.local/info.php/foo/bar?baz=2');