Php Codeigniter-共享用于将网站复制到移动网站的项目文件
我需要在另一个域上复制该网站。 这两个域将共享相同的数据库和相同的逻辑 现在假设这是我的申请方案Php Codeigniter-共享用于将网站复制到移动网站的项目文件,php,codeigniter,directory-structure,Php,Codeigniter,Directory Structure,我需要在另一个域上复制该网站。 这两个域将共享相同的数据库和相同的逻辑 现在假设这是我的申请方案 application js css system .htaccess index.php 为其他域复制站点的最佳做法是什么 开始之前我需要知道什么 NB:基本上,我只需要复制移动站点域的html、css和js,因此我将有www.site.com和www.mobile.site.com这就是您的目录结构: -/home/yourdomain -public_html -in
application
js
css
system
.htaccess
index.php
为其他域复制站点的最佳做法是什么
开始之前我需要知道什么
NB:基本上,我只需要复制移动站点域的html、css和js,因此我将有www.site.com和www.mobile.site.com这就是您的目录结构:
-/home/yourdomain
-public_html
-index.php
-.htaccess
-mobile
-index.php
-.htaccess
-assets
-js
-css
-img
-etc
-your_application
-system
-application
要共享相同的CodeIgniter安装和应用程序,您可以将系统
和应用程序
文件夹放在web根目录上方,这是一个好主意(在本例中,它位于您的应用程序
目录中)
假设您的域指向:public\u html
,移动域指向:public\u html/mobile
,那么您将向这两个位置添加CodeIgniter的默认index.php
。更新这两个文件以指向系统文件夹和应用程序文件夹:
$system_folder = /home/yourdomain/your_application/system;
$application_folder= /home/yourdomain/your_application/application;
这些资产可以公开访问,因此只需确保生成的HTML指向正确的位置,例如:
http://yourdomain.com/assets/css/main.css
这两个站点是否将托管在同一台服务器上?