PHP code example of fccn / webapp-tools-common

1. Go to this page and download the library: Download fccn/webapp-tools-common 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/ */

    

fccn / webapp-tools-common example snippets



$c = array(
  "install_path"    => $fs_root,
  "base_path"       => "",
  "assets_path"     => $fs_root."/assets",
  "logfile_path"    => $fs_root."/logs/test.log",
  "logfile_level"     => "DEBUG",
));


$c = array(
    ...
    "logfile_path"    => "path-to-log-file",
    "logfile_level"     => "DEBUG|ERROR|INFO|NOTICE|WARNING",
    ...
  )

//compress parameters to use on a GET request
\Fccn\Lib\WebAppUtils::compress_params('param1' => 'val1', 'param2' => 2)

//retrieve parameters from a GET parameter
\Fccn\Lib\WebAppUtils::decompress_params($_GET['params']);