PHP code example of almacil / php-core

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

    

almacil / php-core example snippets


// Require composer autoloader
le = 'app.config.json';

// Create de instance
$app = new \Almacil\App($rootDir, $configFile);
javascript
{
  "display_errors": true,
  "languages": [
    "es_ES",
    "en_GB"
  ],
  "timezone": "Europe/Madrid",

  "spa": {
    "enabled": true
  },
  "cache": {
    "enabled": true,
    "directory": "disk/cache",
    "time": 10
  },
  "database": {
    "enabled": true,
    "directory": "disk/database/",
    "extension": "json"
  },
  "http": { // Developing
    "enabled": true,
    "defaultPrefix": ""
  },
  "translate": {
    "enabled": true,
    "directory": "disk/i18n/",
    "findMissingTranslations": false
  },
  "router": {
    "enabled": true,
    "routesFile": "app.routes.json"
  },

  "environments": {
    "baseFile": "environments/base.json",
    "production": {
      "domain": "id.core.almacil.com",
      "propertiesFile": "environments/production.json"
    },
    "development": {
      "domain": "localhost:8000",
      "propertiesFile": "environments/development.json"
    }
  }
}