1

php で writhed アプリケーションをデプロイする必要があります。これは wamp サーバー (win 上) を使用して開発されました。これを apache2 debian サーバーにデプロイする必要があります。アプリケーションは wamp を使用して開発者の PC で動作しますが、debian サーバーでは動作しません。

問題は、すべてのグリッド (jquery グリッド) が ajax を使用してコンテンツをロードすることです。

grid.jqGrid({
            datatype: "xml",
            url:'../Controladores/cPedidos.php?action=lpd',
            mtype: 'POST',
            colNames:['FECHA','DEPOSITO','USUARIO'],
            colModel:[
                {name:'fecha_pedido',index:'fecha_pedido',width:120, sorttype: 'date'},
                {name:'deposito',index:'deposito',width:500, editable:false},
                {name:'usuario_id',index:'usuario_id',width:150, editable: false}
            ],
            rowNum:10,
            rowList:[10,20,40],
            pager: '#paginacion',
            gridview:true,
            rownumbers:true,
            ignoreCase:true,
            sortname: 'fecha_pedido',
            viewrecords: true,
            sortorder: "asc",
            caption:"Pedidos",
            height: "100%",
            subGrid : true,
            subGridUrl: '../Controladores/cPedidos.php?action=lad',
            subGridModel: [{ name  : ['Codigo','Cantidad','Articulo','Estado','Categoria','Observaciones'], 
                width : [50,50,450,60,60,150] }], 
            editurl: '../Controladores/cPedidos.php?action=editar',
            ondblClickRow: function(id, ri, ci) {
                // edit the row and save it on press "enter" key
                grid.jqGrid('editRow',id,true,null,null, 'clientArray');
            },
            onSelectRow: function(id) {
                if (id && id !== lastSel) {
                    // cancel editing of the previous selected row if it was in editing state.
                    // jqGrid hold intern savedRow array inside of jqGrid object,
                    // so it is safe to call restoreRow method with any id parameter
                    // if jqGrid not in editing state
                    if (typeof lastSel !== "undefined") {
                        grid.jqGrid('restoreRow',lastSel);
                    }
                    lastSel = id;
                }
            }
        }).jqGrid('navGrid','#pager',{add:false,edit:false},{},{},myDelOptions,{multipleSearch:true,overlay:false});
        //grid.jqGrid('filterToolbar',{defaultSearch:'cn',stringResult:true});
        $("#filtro").change(function(){
            var valor = $("#filtro").val();
            $("#tablapedidos").jqGrid().setGridParam({url:'../Controladores/cPedidos.php?action=lpd&filtro='+valor}).trigger('reloadGrid');
        });

問題は、何も読み込まれないことです。firebug を使用すると、URL への投稿が中止されます。

ブラウザに URL を直接入力すると (ff)、「接続がリセットされました」というエラーが表示されます。Chrome:「エラー 324 (net::ERR_EMPTY_RESPONSE)」。開発者のPCのローカルホストでそれを行うと、XMLファイルを取得し、URLページはechoを使用してXMLファイルを作成します、例(完全ではありません)

function getArticulosPendientes() {
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml;charset=utf-8"); } else {
header("Content-type: text/xml;charset=utf-8");
}
$et = ">";
echo "<?xml version='1.0' encoding='utf-8'?$et\n";
echo "<rows>";

$lista = getListaArticulosPendientes($_POST);
$resultado = array();

for($i = 0; $i < count($lista); $i++) {
    $fila = $lista[$i];
    $dif = diferenciaCompradoPedido($fila['item_id']);
    if($dif > 0) {
        $fila['cantidad'] = $dif;
        array_push($resultado, $fila);
    }
    else {
        array_push($resultado, $fila);
    }
}

for($a = 0; $a < count($resultado); $a++) {
    $row = $resultado[$a];
    $fecha = date("d/m/Y H:i", strtotime($row["fecha_pedido"]));
    echo "<row id='". $row["item_id"]."'>";
    echo "<cell>". $fecha."</cell>";
    echo "<cell>". $row["cantidad"]."</cell>";
    echo "<cell><![CDATA[". utf8_encode($row["descripcion"])."]]></cell>";
    echo "<cell><![CDATA[". $row["categoria"]."]]></cell>";
    echo "<cell><![CDATA[". $row["usuario_id"]."]]></cell>";
    echo "<cell><![CDATA[". $row["estado"]."]]></cell>";
    echo "<cell><![CDATA[". $row["observaciones"]."]]></cell>";
    echo "</row>";
}
echo "</rows>";

}

何か案は

4

1 に答える 1

0

相対パスを使用しています。パスを次のような絶対パスに変更します: http://www.yourdomain.com/folder/path/to/Controladores/cPedidos.php?action=lpd

于 2013-03-25T13:06:17.457 に答える