ecshop中define('IN_ECS', true)的作用
2012-05-15 17:18
375 查看
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);
- if(!defined('IN_ECS')){die('Hacking attempt');}
- C编译时`true' undeclared (first use in this function)
- C编译时`true' undeclared (first use in this function)
- error: 'for' loop initial declarations are only allowed in C99 mode
- 浅析python 中__name__ = '__main__' 的作用
- The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .pn
- eclipse中“No repository found in 'svn://127.0.0.1/***'”的解决方法
- Error creating bean with name 'sessionFactory' defined in ServletContext resource
- poj 2388 Who's in the Middle 排序,大水
- Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly
- python解决 'ascii' codec can't decode byte 0xe5 in position 3: ordinal not in range(128)
- HDOJ 1157 Who's in the Middle(水)
- WPF Background property does not point to a dependencyobject in path '(0).(1)'
- "The string '__checksum' was not found in the string table"解决办法
- What's new in Android M - Run Time Permission
- 500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp
- IOS 'NSInternalInconsistencyException'