构建CMS到网站 [英] Building a CMS to For Website

查看:111
本文介绍了构建CMS到网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的主要网站 kansasoutlawwrestling.com 将使用Codeigniter,然后我也创建一个CMS为自己,是一个单独的实体,将位于 kansasoutlawwrestling.com/kowmanager



我的CMS将使用不同的CSS,javascript和图像文件,想知道我是否应该只有两个不同的安装CI。我尝试查看 PyroCMS ,但是文件夹太多,我在理解其文件结构时遇到问题。这是什么正确的设置是?

解决方案

Codeigniter的基本结构是你有2个文件夹和1个文件您的根文件夹:

  root / application / 
root / system /
root / index.php

现在,你可能还有更多的文件和文件夹,每个Codeigniter应用程序运行。



这些都是什么?首先,每个网页请求都从 index.php 开始。



Codeigniter位于何处?这将是系统文件夹。这个文件夹不应该被你或任何人触摸。与您的应用程序相关的所有内容都存储在应用程序文件夹中。这包括所有配置,你的控制器,你的模型,你的视图,甚至你的库扩展(虽然你可以存储此文件夹之外的其他东西,如images / css / js / fonts等)。



因此,设置商店的正确方法是:

  root / application / 
root / system /
root / index.php

root / kowmanager / application
root / kowmanager / index.php


但是,您必须通知您的kowmanager的 index.php ,系统文件夹不在同一目录。因此,在第25行左右的 index.php kowmanager 内)中,应该会看到:

  $ system_path =system; 

只需将其更改为:

  $ system_path =../system; 

完成。



现在您的应用程序(您的主要网站和您的CMS)将共享相同的Codeigniter基础。更新CI时,您可以在主要的系统资料夹中执行一次...


I have my main site kansasoutlawwrestling.com which will be using Codeigniter, and then I am also creating a CMS for myself that is a separate entity which will be located at kansasoutlawwrestling.com/kowmanager.

My CMS will use different CSS, javascript, and image files, so I'm wondering if I should just have two different installs of CI. I tried looking at PyroCMS, but there's way too many folders and I was having a problem understanding its file structure. What is the proper set up for this is?

解决方案

The basic structure of Codeigniter is that you have 2 folders and 1 file in your root folder:

root/application/
root/system/
root/index.php

Now, obviously, you might have many more files and folders in there as well, but these are the basics upon which every Codeigniter app runs.

What do each of these do? To begin with, every page request starts at index.php. This page set's up some configurations and some constants, and then hands over the reigns to Codeigniter.

Where is "Codeigniter" located? That would be the system folder. This folder should never be touched, by you or anyone else. Everything pertaining to your app is stored within the application folder. This includes all your configurations, your controllers, your models, your views, even your library extensions (although you could store other stuff outside this folder, like images/css/js/fonts etc.).

So, the correct way to set up shop would be:

root/application/
root/system/
root/index.php

root/kowmanager/application
root/kowmanager/index.php

But, you have to inform your kowmanager's index.php that the system folder is not located in the same directory. So, within the index.php (inside of kowmanager), at around line 25, you should see this:

$system_path = "system";

Simply change it to:

$system_path = "../system";

and you're done.

Now both your apps (your main site and you CMS) will be sharing the same Codeigniter base. When the time comes to update CI, you'll do that once within the main system folder...

这篇关于构建CMS到网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆