Cuando comienzas un proyecto utilizando el framework CodeIgniter como base, quizá hagas una copia de todos los ficheros de la última versión de CodeIgniter. Este método es el más sencillo inicialmente, pero tiene el inconveniente de aumentar el tamaño del proyecto innecesariamente, y es en el futuro dificil actualizar la versión de CodeIgniter, sobre todo si desarrollamos unas cuantas webs.
Paso 1: Almacenar las versiones de CodeIgniter en una carpeta común
La idea es tener una carpeta de nuestro servidor weben la que iremos almacenando las distintas versiones de CodeIgniter, a medida que vayan publicandose. Por ejemplo:
/var/www/lib/codeigniter/CodeIgniter_1.7.2 /var/www/lib/codeigniter/CodeIgniter_1.7.3
Paso 2: Crear las carpetas de nuestro proyecto
Vamos a crear un proyecto CodeIgniter de ejemplo, en la carpeta
/var/www/ejemplo
y dentro de esta carpeta:
- copiaremos la carpeta application, que está dentro de system en CodeIgniter.
- crearemos una carpeta public, que será la raiz para el servidor web.
- copiaremos dentro de public el fichero index.php, que viene con CodeIgniter
- si utilizamos .htaccess para quitar index.php de las URLs, lo pondremos dentro de public.
Al final tendremos algo como esto:
/var/www/ejemplo/ |-- application | |-- config | | |-- autoload.php | | |-- config.php | | |-- constants.php | | |-- database.php | | |-- doctypes.php | | |-- hooks.php | | |-- index.html | | |-- mimes.php | | |-- routes.php | | |-- smileys.php | | `-- user_agents.php | |-- controllers | | |-- index.html | | `-- welcome.php | |-- errors | | |-- error_404.php | | |-- error_db.php | | |-- error_general.php | | |-- error_php.php | | `-- index.html | |-- helpers | | `-- index.html | |-- hooks | | `-- index.html | |-- index.html | |-- language | | `-- english | | `-- index.html | |-- libraries | | `-- index.html | |-- models | | `-- index.html | `-- views | |-- index.html | `-- welcome_message.php `-- public |-- index.php |-- .htaccess |-- css |-- img `-- js
Debemos indicar a CodeIgniter donde se encuentran las carpetas que contienen el sistema y los ficheros de nuestra aplicación.
Editamos el fichero index.php que hemos colocado en public, y editamos las 2 lineas en donde se indican las rutas:
|--------------------------------------------------------------- | SYSTEM FOLDER NAME |--------------------------------------------------------------- | | This variable must contain the name of your "system" folder. | Include the path if the folder is not in the same directory | as this file. | | NO TRAILING SLASH! | */ $system_folder = "/var/www/CodeIgniter_1.7.2/system"; /* |--------------------------------------------------------------- | APPLICATION FOLDER NAME |--------------------------------------------------------------- | | If you want this front controller to use a different "application" | folder then the default one you can set its name here. The folder | can also be renamed or relocated anywhere on your server. | For more info please see the user guide: | http://codeigniter.com/user_guide/general/managing_apps.html | | | NO TRAILING SLASH! | */ $application_folder = "../application"; /* |=============================================================== | END OF USER CONFIGURABLE SETTINGS |===============================================================
Ahora configuramos nuestro servidor web para que la carpeta raiz sea public, y accedemos al sitio web con el navegador. Debería salirnos la página saludo de CodeIgniter.
A partir de aquí, podemos utilizar CodeIgniter de la manera habitual, almacenando nuestros controladores, librerias, modelos, etc. en la carpeta application.
Good post, amazing looking blog, added it to my favorites.
I wasn’t aware of the many ripples and depth to this story until I surfed here through Aol! Fantastic job. My kindest regards, Treasa.
Hola, muy interesante el articulo, saludos desde Chile!
Muy buen articulo, estoy casi 100% de acuerdo contigo
Buen articulo, estoy de acuerdo contigo aunque no al 100%:)
When i visit a blog, chances are that I see that the construction is poor and the writting bad.On the other hand,I could honestly say that you writting is decent and your website solid.
Hello this is somewhat of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
For some cause the picture isn’t loading effectively, is presently there an issue?
I’v been wondering If you could be more specific on this subject ConfiguraciĂłn avanzada de CodeIgniter 1: Utilizando una instalaciĂłn comĂşn a todas las aplicaciones CloverBlog. I send you @ with some further questions!Thank you!
Amazing Publish, Thanks
I’m really enjoying the design and layout of your blog. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a developer to create your theme? Excellent work!
The only norm to be followed is ‘Don’t get personal’ as that deviates from the subject matter under discussion. Such digressions should be shunned equally well with an iron hand. The moment someone says ‘So you believe you know better? ‘ drop the discussion and leave.