dqi*_*qiu 5 php ajax jquery codeigniter
有没有办法区分ajax调用和PHP中的普通浏览器请求(或codeigniter是具体的)?
这是我的jquery ajax调用:
$(document).ready(function() {
$('#container').load('http://localhost/index.php/customer/');
});
Run Code Online (Sandbox Code Playgroud)
这是codeigniter中客户控制器的索引方法:
public function index() {
//if (call == 'ajax request')
// do this if it's an ajax request;
//else
// do that if user directly type the link in the address bar;
$this->load->view('customer/listview');
}
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激.谢谢.
| 归档时间: |
|
| 查看次数: |
1209 次 |
| 最近记录: |