-1

我在这里得到了这个 CGI 代码:

   \$('#example').dataTable( {
         "bProcessing": true,
         "bServerSide": true,
         "sAjaxSource": "scripts/run.cgi",
         "fnServerParams": function ( aoData ) {
            aoData.push( { "mysqltablename": "MYSQL_123490dfasdf039a" } );
         },
         "iDisplayLength": 50
     } );

我不明白如何访问 run.cgi 端的 key:value (mysqltable,MYSQL_123490dfasdf039a)。我尝试了以下但没有看到它列出。帮助。

new CGI
...
my %paramstemp = $q->Vars;
       open (FILE, ">/proj/hwmodels/unix_webserver/temp/asdf") ;
       print FILE Dumper \%paramstemp; 
       close FILE;
4

1 回答 1

0

在这上面花了太多时间。发现语法是这样的:

                 "fnServerParams": function ( aoData ) {
                    aoData.push( { "name": "mysqltablename", "value": "MYSQL_123490dfasdf039a" }, { "name": "asdfasdf", "value": "asdfasdfasdf" } );
                 }
于 2013-10-06T02:21:04.797 回答