Home >Backend Development >PHP Tutorial >Yii 框架 进展jQuery ajax 提交返回 POST 400 Not Found 报错,求解决

Yii 框架 进展jQuery ajax 提交返回 POST 400 Not Found 报错,求解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:13:531328browse

Yii 框架 进行jQuery ajax 提交返回 POST 400 Not Found 报错,求解决

本帖最后由 burningx 于 2014-12-22 21:16:40 编辑
<br />$.ajax({<br />                url:"<?php echo $this -> createUrl('edit') ?>",<br />                type:'post',<br />                data:{aidArr:aidArr,hide:obj},<br />                dataType:'json',<br />                success:function (data){<br />                    if(data.status == 1){<br />                        window.location.href = "<?php echo $this -> createUrl('select') ?>";<br />                    }else{<br />                        alert('发布失败');<br />                    }<br />                },<br />                error:function(boj,info){<br />                    alert(info);<br />                },<br /><br /><br />                });<br />



这到底是什么问题造成的啊?昨天写完都没问题,功能都测试过了,但是今天就发现全部由ajax提交的都提示这错误了,一头雾水+无从下手,各位帮忙一下啊!!!

------解决思路----------------------
哥。。你是不是控制器里的action写错了啊?
看样子应该是控制 AdminController 里的 actionArticle($edit) 方法??? 
还是你module模块 AdminModule里的 ArticleController  EditAction(//这里是不是没写参数?)方法??
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP生成PDF有关问题Next article:php 联接zookeeper实例