私はこの単純なフレームワークを使用しています。他のカスタム PHPPHPとの混乱の後です。
私は次のコントローラーを持っています:
<?php
class TestController extends BaseController
{
    public function __construct($action, $urlValues) {
        parent::__construct($action, $urlValues);
    }
    public function deploy_test() {
        echo json_encode("helloworld");
    }
}
?>
その機能は、.jsと呼ばれる機能によってアクティブ化されtest()ます。
function test()
{
    var data = {
        config   : $("#config").val(),
        machines : $("#machines").val(),
        test     : $("#test").val(),
        product  : $("#product").val(),
    };
    $.post('./index.php/test/deploy_test/', data, 
    function( answer ){
        create_bar();
        console.log( answer );
    });
}
ただし、返されるのはindex.phpページhtml自体であり、"helloworld"期待どおりの文字列ではありません。何が起こっているのかわかりません。誰か私を喜ばせてくれませんか?出力は次のとおりです。
<!DOCTYPE html>
<html>
<head>
<title>Deployer</title>
</head>
<body>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">