Best-practice setting up CI with WAMP |
[eluser]MaartenDeGroote[/eluser]
Hi there everybody, I'm thinking about moving over to CI for the development of my websites. I make extensive use of the jQuery library and use plugins like swfObject and sIFR. I set up my local development environment using WAMP-server for windows. While playing around with WAMP and CI I was wondering if anybody has some best-practice ideas on setting up CI locally. I want to accomplish the following: - Have multiple applications of CI running where each application represents one client website. - Being able to address resources (css/js/images) with absolute urls instead of relative ones Does anybody know how to configure this? I already know that I need to move the application folder out of the system folder and that I should change the index.php file accordingly. However, do I need to set up VirtualHost in WAMP or something like that? And what should be the base_url for each application in the config.php file in order to make use of absolute urls? Are there any other steps I need to take in order to get things working the way I want? Where do I put sIFR or jQuery for example? Questions, questions, questions... Anyway, any help would be greatly appreciated. Maybe it's a good idea to outline how forum-members have set up their local environment? Thanx in advance for your time! Regards, Martin
[eluser]tomcode[/eluser]
I've stopped all special configurations and setups. Instead I keep all project related files under one folder : - local : the project / site later to deploy, under svn, containing all files required (db dumps, AS classes, etc) - maybe several other folders containing files I've received from the client, stuff I've been working on, zipped versions validated / deployed The only exception are files related to offers, invoices and the mails.
[eluser]designfellow[/eluser]
Hi, I usually put my folders in same level. Like this... -system -application -images -css -js etc. And i load the files in views like .. <link rel="stylesheet" href="<?php echo base_url();?>css/defult.css" /> It works fine for me.. Happy Coding, DesignFellow
[eluser]Johan André[/eluser]
I configure a local dns to point to the working directory. That way I don't need to access my site with http://localhost/my_site and can do http://mysite/ When I deploy the site on my webserver no paths have to be changed. I can also reference my assets like: Code: <link rel="stylesheet" media="screen" href="/assets/css/style.css" /> I use this structure: Code: application
[eluser]Reynolds[/eluser]
Mine's almost similar with the others. application_name - application (config, controller,models,views,etc) - resources - css (centralized) - images (centralized) - js (centralized) - themes (specific per theme) - default - css - images - js - index.php - .htaccess system - 1.7.1 - 1.7.2 user_guide ------------- Note: - I've added a lot of definitions inside the bootstrap (index.php) that is used by routes.php, config.php, etc. - Also I've made base_url() useless, coz I'm using now BASE_URL, others are: Code: // define a default application and below the block of Code: /* Code: define("THEME", BASE_URI . "resources/themes/" . DEFAULT_THEME . "/");
[eluser]John_Betong[/eluser]
The way I handle localhost multiple applications is to have a separate _menu.php . Which has my sub-domains, current CodeIgniter projects, normal HTML sites and a call to my phpMyAdim(). // Maybe a better way and I am open to options The normal PHP form radio-button names are: 1. passed back to _menu.php 2. checked to see if a $_GET['application'] was passed 3. if $_GET is set then set $_SESSION['_MENU_'] = $_GET['application']; and call header("Location: http://localhost/index.php"); The CodeIgninter index.php is virtually standard apart from: Code: // default to johns-jokes if no PHP $_SESSION set 101 |
Welcome Guest, Not a member yet? Register Sign In |