ecshop中define('IN_ECS', true)的作用
2012-03-29 15:03
204 查看
ecshop中为什么要写Hacking attempt
ecshop中为什么要定义'IN_ECS'
ecshop里的有些.php页是不需要用户通过url直接访问的,用来被其它页调用的,例如/includes/init.php,就不需要直接访问,通过url访问你的网址/includes/init.php是无意义的,所以我们在可以直接方问的php里加上
define('IN_ECS', true);
在不能直接访问的php里加上
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
这样当直接访问init.php里就会显不
Hacking attempt
从页起到禁止访问的目的,而其它页面在调用init.php时是正常的
这样做另一个好处,就是更安全
ecshop中为什么要定义'IN_ECS'
ecshop里的有些.php页是不需要用户通过url直接访问的,用来被其它页调用的,例如/includes/init.php,就不需要直接访问,通过url访问你的网址/includes/init.php是无意义的,所以我们在可以直接方问的php里加上
define('IN_ECS', true);
在不能直接访问的php里加上
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
这样当直接访问init.php里就会显不
Hacking attempt
从页起到禁止访问的目的,而其它页面在调用init.php时是正常的
这样做另一个好处,就是更安全
相关文章推荐
- ecshop中define('IN_ECS', true)的作用
- ECshop中defined('IN_ECS')的实现原理
- ecmall define('IN_ECS', true);
- C编译时`true' undeclared (first use in this function)
- if(!defined('IN_ECS')){die('Hacking attempt');}
- C编译时`true' undeclared (first use in this function)
- HDU1157:Who's in the Middle
- kdesvn中删除文件夹后commit出现Aborting commit: 'pdu/rootfs/busybox-1.15.3' remains in tree-conflict错误
- Initalizing 'AppDelegate * __strong' with an expression of incompatible type ''id<UIApplicatioinDele
- svn: Aborting commit: '/aaa/bbb/xxxxxxxx' remains in conflict解决方法
- Could not resolve placeholder 'master.jdbc.url' in string value "${master.jdbc.url}"
- no plugin found for prefix 'tomcat 7' in the current project and in the plugin groups
- Error registering bean with name 'dataSource' defined in class path resource
- php+mysql时报错:Unknown column '' in 'field list'解决方案
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- ibtoolize: `COPYING.LIB' not found in `/usr/share/libtool/libltdl' 问题解决方案
- Mastering Debugging in Visual Studio 2010 - A Beginner's Guide
- hdu 3576 Elevators in Jiayuan Students' Apartment
- 'O_BINARY' undeclared (first use in this function)