Managing your Applications在同一个CI中设置多个application文件夹



By default it is assumed that you only intend to use CodeIgniter to manage one application, which you will build in your application/ directory. It is possible, however, to have multiple sets of applications that share a single CodeIgniter installation, or even to rename or relocate your application directory.

Renaming the Application Directory

If you would like to rename your application directory you may do so as long as you open your main index.php file and set its name using the $application_folder variable:

$application_folder = 'application';

Relocating your Application Directory

It is possible to move your application directory to a different location on your server than your web root. To do so open your main index.php and set a full server path in the $application_folder variable:

$application_folder = '/path/to/your/application';

Running Multiple Applications with one CodeIgniter Installation

If you would like to share a common CodeIgniter installation to manage several different applications simply put all of the directories located inside your application directory into their own sub-directory.

For example, let’s say you want to create two applications, named “foo” and “bar”. You could structure your application directories like this:

applications/foo/
applications/foo/config/
applications/foo/controllers/
applications/foo/libraries/
applications/foo/models/
applications/foo/views/
applications/bar/
applications/bar/config/
applications/bar/controllers/
applications/bar/libraries/
applications/bar/models/
applications/bar/views/

To select a particular application for use requires that you open your main index.php file and set the $application_folder variable. For example, to select the “foo” application for use you would do this:

$application_folder = 'applications/foo';

Note

Each of your applications will need its own index.php file which calls the desired application. The index.php file can be named anything you want.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Book Description “For those not ready to tackle the complexities of Objective-C, this is a great way to get started building iPhone apps. If you know the basics of HTML, JavaScript, and CSS, you’ll be building apps in no time.” —August Trometer, Owner of FoggyNoggin Software, www.foggynoggin.com Discover the Easier, Faster Way to Build High-Quality iPhone Applications Now, you don’t need to dive headfirst into Objective-C to write state-of-the-art applications for the iPhone. You can use web development tools and technologies you already know: JavaScript, HTML, and CSS. In this book, long-time web and mobile application developer Lee S. Barney shows you how to use the QuickConnect and PhoneGap frameworks to create secure, high-quality, modular hybrid iPhone applications. Lee S. Barney walks you through the entire hybrid iPhone development process, from creating great user interfaces to compiling, deploying, and executing applications. Along the way, he introduces techniques and sample code designed to streamline development, eliminate complexity, optimize performance, and leverage all iPhone’s native capabilities—from its accelerometer and GPS to its built-in database. Coverage includes Using Dashcode and Xcode together to create unique, exciting hybrid iPhone applications Using the QuickConnect JavaScript API to perform tasks ranging from vibrating the phone to accessing the accelerometer and GPS location data Accessing native iPhone functionality using the PhoneGap JavaScript API Storing, retrieving, and managing data on the iPhone, even without network access Using XMLHttpRequest to access or synchronize remote data and use web services Creating Google-based maps for your own app that work like those you see in the iPhone’s Maps application This book systematically lowers the barriers to iPhone development, enabling web developers to build any iPhone application they can imagine without long development cycles or steep learning curves!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值