我想将yii framework文件夹移到www访问之外 [英] I would like to move yii framework folder outside of www access

查看:76
本文介绍了我想将yii framework文件夹移到www访问之外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将开始对一些小型php项目使用Yii框架(我以前习惯于使用代码点火器框架).

I am about to start using Yii framework for some small php projects (I am used to using the code igniter framework previously).

我想知道两件事: a)是否可以将/framework文件夹移到Linux上的Web根目录之外(尤其是centOS),例如:/var/framework_here

I want to know two things: a) Is it possible to move the /framework folder outside of the web root on linux (centOS in particular) for example: /var/framework_here

b)您能否指出有关此的资源或文章以及如何实际执行任务?

b) Could you point me to resources or articles about this and how to actually carry out the task?

我已将框架DIR移到public_html之外(我的Web根目录之外),并尝试修改演示项目中的路径,但它们不起作用-所以我猜我做错了.

I've moved the framework DIR outside of public_html (outside my web root) and tried modifying the paths in the demo projects but they don't function - so I guess I'm doing it wrong.

到目前为止,我只能在正常的Web访问范围之外找到有关在yii项目中发送受保护"目录的信息.

So far i've only been able to find info on sending the 'protected' directory within a yii project outside normal web access.

也许我误会了,但是我认为做自己想做的事会大大提高系统安全性-这实际上是我想这样做的主要原因,因此我再次提出建议/意见.

Perhaps I've mis-understood, but I thought doing what i want to do would greatly improve system security - that is actually the main reason i want to do this so again I'm open to suggestions/comments.

谢谢

推荐答案

您应该在每个演示项目中修改index.php. 查找行

You should modify index.php in each demo project. Find line

$yii=dirname(__FILE__).'/../../framework/yii.php';

并将其更改为类似

$yii='/Absolute path to framework folder/yii.php';

这篇关于我想将yii framework文件夹移到www访问之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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