在远程服务器上配置了一个cgi页面,该页面代码调用perl的xml::writer模块,生成XML文件无法成功。
我用perl写了一个页面test.cgi该页面的基本功能就是:显示多个复选框(checkbox)选中提交后,对应复选框的value值作为参数再传回test.cgi,并将这...
我用perl写了一个页面test.cgi 该页面的基本功能就是:显示多个复选框(checkbox) 选中提交后,对应复选框的value值作为参数再传回test.cgi,并将这些参数写入xml 保存在远程服务器,与test.cgi相同的路径中。 我通过登录远程服务器,使用代码行 perl5.8 test.cgi可以成功实现 并生成了output.xml 为何在本地使用浏览器就不行?权限问题?求大神帮忙~~~~
另附貌似没有被执行的写XML部分的代码:
use IO;
my $output = new IO::File(">output.xml");
use XML::Writer;
my $writer = new XML::Writer( OUTPUT => $output );
$writer->xmlDecl( 'UTF-8' );
$writer->doctype( 'html' );
$writer->comment( 'My happy little HTML page' );
$writer->pi( 'foo', 'bar' );
$writer->startTag( 'html' );
$writer->startTag( 'body' );
$writer->startTag( 'h1' );
$writer->startTag( 'font', 'color' => 'green' );
$writer->characters( "<Hello World!>" );
$writer->endTag( );
$writer->endTag( );
$writer->dataElement( "p", "Nice to see you." );
$writer->endTag( );
$writer->endTag( );
$writer->end( );
补充一下:会不会跟apache服务器有关?在apache config里有没有相关XML处理的模块之类的 没打开 展开
另附貌似没有被执行的写XML部分的代码:
use IO;
my $output = new IO::File(">output.xml");
use XML::Writer;
my $writer = new XML::Writer( OUTPUT => $output );
$writer->xmlDecl( 'UTF-8' );
$writer->doctype( 'html' );
$writer->comment( 'My happy little HTML page' );
$writer->pi( 'foo', 'bar' );
$writer->startTag( 'html' );
$writer->startTag( 'body' );
$writer->startTag( 'h1' );
$writer->startTag( 'font', 'color' => 'green' );
$writer->characters( "<Hello World!>" );
$writer->endTag( );
$writer->endTag( );
$writer->dataElement( "p", "Nice to see you." );
$writer->endTag( );
$writer->endTag( );
$writer->end( );
补充一下:会不会跟apache服务器有关?在apache config里有没有相关XML处理的模块之类的 没打开 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询