ThinkPHP点滴

1.thinkphp里的U函数不能在js里解析,可以在PHP页面上用<script>标签里定义一个js的全局变量,

<script type='text/javascript'>

   var url='{:U("Index/Index/handle")}';

</script>

2.THINKPHP内置一些判断请求类型的常量

IS_POST

IS_AJAX

猜你喜欢

转载自radzhang.iteye.com/blog/2272573