[英]how to check this codeigniter php function working or not that function using in ajax url
my script code: 我的脚本代码:
<script type="text/javascript">
function changebox(curval,datashow){
alert(curval);
$.ajax({
type:"POST",
data:"del="+curval,
url:"<?php echo site_url('grocery/add_to_show');?>",
success: function(html){
$('#'+datashow).html(html);
}
});
}
</script>
the url contain php function 网址包含php函数
url:"<?php echo site_url('grocery/add_to_show');?>",
then how to i confirm this PHP function properly working without returning any error 然后我如何确认此PHP函数正常工作而不返回任何错误
please give a way to solve this problem 请给出解决此问题的方法
使用javascript中的php代码警报,然后您可以轻松知道它返回的值。
make sure your firebug console tab (or chrome console) is opened. 确保已打开Firebug控制台标签(或Chrome控制台)。 You will see all info if any error occurred.
如果发生任何错误,您将看到所有信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.