PHP code example of oldpocket / arais

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

    

oldpocket / arais example snippets


// SQLite env
putenv('SQLITE_FILE_NAME=data.sqlite');

// MySQL env example
// putenv('MYSQL_HOST=[my_arais_mysql_server]:[port]'); // Database Server Host
// putenv('MYSQL_DB=[my_arais_db]');       // Database Name
// putenv('MYSQL_USER=[my_db_user]');           // Database Username
// putenv('MYSQL_PASSWD=[my_db_passwd]');         // Database Password

// Time Zone of the application
putenv('APP_TIME_ZONE=America/Sao_Paulo');

// LOGGING INFORMATION
// PHP
putenv('PHP_ERROR_REPORTING=E_ALL');
putenv('PHP_DISPLAY_ERROS=1');