Skip to content
Snippets Groups Projects
Commit bfbb91c4 authored by Eborio's avatar Eborio
Browse files

Archivos del videotutorial 3 listos

parent 6e5c3455
No related branches found
No related tags found
No related merge requests found
# Configuración de CodeIgniter
 
En este video configuramos el lenguaje español en nuestra instalación de CodeIgniter. El paquete de idiomas usado en el videotutorial ya no está disponible en la actualidad, pero pueden encontrar un paquete mejorado en [este fork](https://github.com/eborio/CodeIgniter-Spanish-Pack) realizado por mi.
En este video dimos un repaso de todos los archivos de configuración de CodeIgniter. Por otra parte configuramos el lenguaje español en nuestra instalación de CodeIgniter.
El paquete de idiomas usado en el videotutorial ya no está disponible en la actualidad, pero pueden encontrar un paquete mejorado en [este fork](https://github.com/eborio/CodeIgniter-Spanish-Pack) realizado por mi.
 
Si desean el paquete original desde donde realicé el fork lo pueden encontrar en [este repositorio](https://github.com/rasec/CodeIgniter-Spanish-Pack).
 
También utilizamos el archivo `constants.php` para evitar configurar de manera manual nuestra URL base. En este directorio puedes encontrar tal archivo para que lo utilices en tus proyectos.
\ No newline at end of file
También utilizamos el archivo `constants.php` para evitar configurar de manera manual nuestra URL base. En este directorio puedes encontrar dicho archivo tanto para CodeIgniter 2 como para CodeIgniter 3 llamados `constants_ci_2.php` y `constants_ci_3.php` respectivamente.
\ No newline at end of file
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
define('FOPEN_READ', 'rb');
define('FOPEN_READ_WRITE', 'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE', 'ab');
define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
// Base URL (keeps this crazy sh*t out of the config.php
if (isset($_SERVER['HTTP_HOST'])) {
$base_url = 'http'
. '://' . $_SERVER['HTTP_HOST']
. str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
// Base URI (It's different to base URL!)
$base_uri = parse_url($base_url, PHP_URL_PATH);
if (substr($base_uri, 0, 1) != '/')
$base_uri = '/' . $base_uri;
if (substr($base_uri, -1, 1) != '/')
$base_uri .= '/';
}
else {
$base_url = 'http://localhost/';
$base_uri = '/';
}
// Define these values to be used later on
define('BASE_URL', $base_url);
define('BASE_URI', $base_uri);
define('APPPATH_URI', BASE_URI . APPPATH);
// We dont need these variables any more
unset($base_uri, $base_url);
/* End of file constants.php */
/* Location: ./application/config/constants.php */
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment