Skip to content

Commit

Permalink
Optimize public/index.php
Browse files Browse the repository at this point in the history
and delete dinamyc creation fo PUBLIC_PATH
  • Loading branch information
joanhey committed Apr 4, 2020
1 parent 7558f5c commit 81b283a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
* - Esta ruta se utiliza para cargar los archivos de la aplicacion
* - En producción, es recomendable ponerla manual usando const
*/
define('APP_PATH', '../app/');
//const APP_PATH = '/path/to/app/';
const APP_PATH = '../app/';

/*
* Define el CORE_PATH
Expand All @@ -64,8 +63,7 @@
* - Ruta al directorio que contiene el núcleo de Kumbia (por defecto la ruta al directorio core)
* - En producción, es recomendable ponerla manual usando const
*/
define('CORE_PATH', '../vendor/kumbia/framework/core/');
//const CORE_PATH = '/path/to/core/';
const CORE_PATH = '../vendor/kumbia/framework/core/';

/*
* Define el PUBLIC_PATH.
Expand All @@ -75,17 +73,11 @@
* - Esta ruta la utiliza Kumbia como base para generar las Urls para acceder de lado de
* cliente (con el navegador web) y es relativa al DOCUMENT_ROOT del servidor web
*
* EN PRODUCCION ESTA CONSTANTE DEBERÍA SER ESTABLECIDA MANUALMENTE
*/
define('PUBLIC_PATH', substr($_SERVER['SCRIPT_NAME'], 0, -9)); // - index.php string[9]

/**
* En producción descomentar las 3 lineas de arriba y usar const
* '/' en el root del dominio, recomendado
* '/carpeta/' en una carpeta o varias
* 'https://www.midominio.com/' usando dominio.
*/
//const PUBLIC_PATH = '/';
const PUBLIC_PATH = '/';

/**
* Obtiene la url usando PATH_INFO.
Expand Down

0 comments on commit 81b283a

Please sign in to comment.