我在使用httpclient从我的一个controller向另一个controller post数据时会返回yii的site/index.php的页面。以下是示例代码:
AController extends CController{
public function actionTest() {
Yii::import('application.vendors.*');
require_once('httpclient/HttpClient.class.php');
echo HttpClient::quickPost('http://localhost/demo/index.php?r=b/test','d=s');
} }
BController extends CController{
public function actionTest()
{
echo $_POST['d'];
} }
当我向一个简单php文件post数据时,返回结果正常,如下:
AController extends CController{
public function actionTest() {
Yii::import('application.vendors.*'); require_once('httpclient/HttpClient.class.php');
echo HttpClient::quickPost('http://localhost/test.php','d=s');
} }
test.php:
<?php echo $_POST['d'];
我想请问强哥,yii是否对这类的post请求有默认的过滤?谢谢。