HOHO,自己太笨了,现在弄明白了,没有搞清楚apche的权限,谢谢大家的帮助。<br><br><div class="gmail_quote">2008/6/5  &lt;<a href="mailto:china-pm-request@pm.org">china-pm-request@pm.org</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send China-pm mailing list submissions to<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm-request@pm.org">china-pm-request@pm.org</a><br>
<br>
You can reach the person managing the list at<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm-owner@pm.org">china-pm-owner@pm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of China-pm digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
 &nbsp; 1. Re: &nbsp;请教perl cgi页面如何显示ls信息 (truncatei)<br>
 &nbsp; 2. Re: &nbsp;请教perl cgi页面如何显示ls信息 (purl lamp)<br>
 &nbsp; 3. Re: &nbsp;China-pm Digest, Vol 38, Issue 3 (gary jsz)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 5 Jun 2008 11:41:18 +0800<br>
From: truncatei &lt;<a href="mailto:truncatei@gmail.com">truncatei@gmail.com</a>&gt;<br>
Subject: Re: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
To: <a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:c0d775f40806042041q28a411a9h47bf116087cbe286@mail.gmail.com">c0d775f40806042041q28a411a9h47bf116087cbe286@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
可以向脚本中加入这些命令<br>
whoami<br>
id<br>
<br>
<br>
2008/6/5 truncatei &lt;<a href="mailto:truncatei@gmail.com">truncatei@gmail.com</a>&gt;:<br>
&gt; 看下运行这个CGI的用户身份,Apache一般运行在不同的用户帐号下<br>
&gt;<br>
&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 5 Jun 2008 11:45:47 +0800<br>
From: &quot;purl lamp&quot; &lt;<a href="mailto:lamp.purl@gmail.com">lamp.purl@gmail.com</a>&gt;<br>
Subject: Re: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
To: <a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:367185060806042045pc9d3f43jafade30e09ce5cca@mail.gmail.com">367185060806042045pc9d3f43jafade30e09ce5cca@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;gb2312&quot;<br>
<br>
maybe the problem is about $HOME<br>
whose home? shall perl work as bash (read the .bashrc to get it)?<br>
<br>
2008/6/5 gary.jsz &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;:<br>
<br>
&gt; &nbsp; 我的代码如下:<br>
&gt; &nbsp;#!/usr/bin/perl -w<br>
&gt; #<br>
&gt; &nbsp;use strict;<br>
&gt; use utf8;<br>
&gt; &nbsp;#use CGI qw/:standard/;<br>
&gt; use CGI qw/:all/;<br>
&gt; &nbsp;print header,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; start_html(&quot;Mailing list manager system page&quot;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; h1(&#39;Maillist&amp;#31649;&amp;#29702;&amp;#31995;&amp;#32479; &#39;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; start_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;What are you doing?&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; popup_menu(-name=&gt;&#39;choose&#39;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-values=&gt;[qw(select create delete modify)]),p,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; submit,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; end_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; hr;<br>
&gt; &nbsp;if(param()){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /select/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print `ls -l \$HOME`;<br>
&gt; #system &quot;ls -l \$HOME&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /create/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date -u&quot;;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp;}<br>
&gt;<br>
&gt; 其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system &quot;ls -l<br>
&gt; \$HOME&quot;也不能打印,还希望各位老师能指教,谢谢!<br>
&gt;<br>
&gt; ------------------------------<br>
&gt; &nbsp; Gary.jsz<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; China-pm mailing list<br>
&gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mail.pm.org/pipermail/china-pm/attachments/20080605/06857eb9/attachment-0001.html" target="_blank">http://mail.pm.org/pipermail/china-pm/attachments/20080605/06857eb9/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 5 Jun 2008 11:52:49 +0800<br>
From: &quot;gary jsz&quot; &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;<br>
Subject: Re: [PerlChina] China-pm Digest, Vol 38, Issue 3<br>
To: <a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:dd532750806042052p6b1187a9u8572b5cedbc84b12@mail.gmail.com">dd532750806042052p6b1187a9u8572b5cedbc84b12@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;gb2312&quot;<br>
<br>
这个文件的所属者为root,而/bin/ls这个文件也是所有用户都可以运行的。<br>
<br>
请问还需要哪里设置嘛?<br>
<br>
2008/6/5 &lt;<a href="mailto:china-pm-request@pm.org">china-pm-request@pm.org</a>&gt;:<br>
<br>
&gt; Send China-pm mailing list submissions to<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
&gt;<br>
&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
&gt; or, via email, send a message with subject or body &#39;help&#39; to<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm-request@pm.org">china-pm-request@pm.org</a><br>
&gt;<br>
&gt; You can reach the person managing the list at<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:china-pm-owner@pm.org">china-pm-owner@pm.org</a><br>
&gt;<br>
&gt; When replying, please edit your Subject line so it is more specific<br>
&gt; than &quot;Re: Contents of China-pm digest...&quot;<br>
&gt;<br>
&gt;<br>
&gt; Today&#39;s Topics:<br>
&gt;<br>
&gt; &nbsp; 1. &nbsp;请教perl cgi页面如何显示ls信息 (gary.jsz)<br>
&gt; &nbsp; 2. &nbsp;请教perl cgi页面如何显示ls信息 (gary.jsz)<br>
&gt; &nbsp; 3. Re: &nbsp;请教perl cgi页面如何显示ls信息 (Yisu Dong)<br>
&gt; &nbsp; 4. Re: &nbsp;请教perl cgi页面如何显示ls信息 (truncatei)<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------<br>
&gt;<br>
&gt; Message: 1<br>
&gt; Date: Thu, 5 Jun 2008 11:11:09 +0800<br>
&gt; From: &quot;gary.jsz&quot; &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;<br>
&gt; Subject: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
&gt; To: &quot;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&quot; &lt;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&gt;, &quot;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&gt;<br>
&gt; Message-ID: &lt;<a href="mailto:200806051111065626409@gmail.com">200806051111065626409@gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;gb2312&quot;<br>
&gt;<br>
&gt; &nbsp;我的代码如下:<br>
&gt; #!/usr/bin/perl -w<br>
&gt; #<br>
&gt; use strict;<br>
&gt; use utf8;<br>
&gt; #use CGI qw/:standard/;<br>
&gt; use CGI qw/:all/;<br>
&gt; print header,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;start_html(&quot;Mailing list manager system page&quot;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;h1(&#39;Maillist&amp;#31649;&amp;#29702;&amp;#31995;&amp;#32479; &#39;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;start_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&quot;What are you doing?&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;popup_menu(-name=&gt;&#39;choose&#39;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -values=&gt;[qw(select create delete modify)]),p,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;submit,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;end_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;hr;<br>
&gt; if(param()){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;if (em(param(&#39;choose&#39;)) =~ /select/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system &quot;date&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print `ls -l \$HOME`;<br>
&gt; #system &quot;ls -l \$HOME&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;if (em(param(&#39;choose&#39;)) =~ /create/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system &quot;date -u&quot;;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; }<br>
&gt;<br>
&gt; 其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system &quot;ls -l<br>
&gt; \$HOME&quot;也不能打印,还希望各位老师能指教,谢谢!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Gary.jsz<br>
&gt; -------------- next part --------------<br>
&gt; An HTML attachment was scrubbed...<br>
&gt; URL:<br>
&gt; <a href="http://mail.pm.org/pipermail/china-pm/attachments/20080605/c3200526/attachment-0002.html" target="_blank">http://mail.pm.org/pipermail/china-pm/attachments/20080605/c3200526/attachment-0002.html</a><br>
&gt;<br>
&gt; ------------------------------<br>
&gt;<br>
&gt; Message: 2<br>
&gt; Date: Thu, 5 Jun 2008 11:11:09 +0800<br>
&gt; From: &quot;gary.jsz&quot; &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;<br>
&gt; Subject: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
&gt; To: &quot;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&quot; &lt;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&gt;, &quot;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:china-pm@pm.org">china-pm@pm.org</a>&gt;<br>
&gt; Message-ID: &lt;<a href="mailto:200806051111065626409@gmail.com">200806051111065626409@gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;gb2312&quot;<br>
&gt;<br>
&gt; &nbsp;我的代码如下:<br>
&gt; #!/usr/bin/perl -w<br>
&gt; #<br>
&gt; use strict;<br>
&gt; use utf8;<br>
&gt; #use CGI qw/:standard/;<br>
&gt; use CGI qw/:all/;<br>
&gt; print header,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;start_html(&quot;Mailing list manager system page&quot;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;h1(&#39;Maillist&amp;#31649;&amp;#29702;&amp;#31995;&amp;#32479; &#39;),<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;start_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&quot;What are you doing?&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;popup_menu(-name=&gt;&#39;choose&#39;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -values=&gt;[qw(select create delete modify)]),p,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;submit,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;end_form,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;hr;<br>
&gt; if(param()){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;if (em(param(&#39;choose&#39;)) =~ /select/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system &quot;date&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print `ls -l \$HOME`;<br>
&gt; #system &quot;ls -l \$HOME&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;if (em(param(&#39;choose&#39;)) =~ /create/){<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system &quot;date -u&quot;;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&gt; }<br>
&gt;<br>
&gt; 其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system &quot;ls -l<br>
&gt; \$HOME&quot;也不能打印,还希望各位老师能指教,谢谢!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Gary.jsz<br>
&gt; -------------- next part --------------<br>
&gt; An HTML attachment was scrubbed...<br>
&gt; URL:<br>
&gt; <a href="http://mail.pm.org/pipermail/china-pm/attachments/20080605/c3200526/attachment-0003.html" target="_blank">http://mail.pm.org/pipermail/china-pm/attachments/20080605/c3200526/attachment-0003.html</a><br>
&gt;<br>
&gt; ------------------------------<br>
&gt;<br>
&gt; Message: 3<br>
&gt; Date: Thu, 5 Jun 2008 11:20:16 +0800<br>
&gt; From: &quot;Yisu Dong&quot; &lt;<a href="mailto:ximiff@gmail.com">ximiff@gmail.com</a>&gt;<br>
&gt; Subject: Re: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
&gt; To: <a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
&gt; Message-ID:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:b3a8e37e0806042020w744d564bp4cfb66eb1edab008@mail.gmail.com">b3a8e37e0806042020w744d564bp4cfb66eb1edab008@mail.gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;gb2312&quot;<br>
&gt;<br>
&gt; 我的没有问题。可以打印<br>
&gt;<br>
&gt; 2008/6/5 gary.jsz &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; &gt; &nbsp; 我的代码如下:<br>
&gt; &gt; &nbsp;#!/usr/bin/perl -w<br>
&gt; &gt; #<br>
&gt; &gt; &nbsp;use strict;<br>
&gt; &gt; use utf8;<br>
&gt; &gt; &nbsp;#use CGI qw/:standard/;<br>
&gt; &gt; use CGI qw/:all/;<br>
&gt; &gt; &nbsp;print header,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; start_html(&quot;Mailing list manager system page&quot;),<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; h1(&#39;Maillist&amp;#31649;&amp;#29702;&amp;#31995;&amp;#32479; &#39;),<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; start_form,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;What are you doing?&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; popup_menu(-name=&gt;&#39;choose&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-values=&gt;[qw(select create delete modify)]),p,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; submit,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; end_form,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; hr;<br>
&gt; &gt; &nbsp;if(param()){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /select/){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date&quot;;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print `ls -l \$HOME`;<br>
&gt; &gt; #system &quot;ls -l \$HOME&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /create/){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date -u&quot;;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp;}<br>
&gt; &gt;<br>
&gt; &gt; 其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system &quot;ls -l<br>
&gt; &gt; \$HOME&quot;也不能打印,还希望各位老师能指教,谢谢!<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<br>
&gt; &gt; &nbsp; Gary.jsz<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; China-pm mailing list<br>
&gt; &gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>
&gt; &gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
&gt; &gt;<br>
&gt; -------------- next part --------------<br>
&gt; An HTML attachment was scrubbed...<br>
&gt; URL:<br>
&gt; <a href="http://mail.pm.org/pipermail/china-pm/attachments/20080605/a285188b/attachment-0001.html" target="_blank">http://mail.pm.org/pipermail/china-pm/attachments/20080605/a285188b/attachment-0001.html</a><br>
&gt;<br>
&gt; ------------------------------<br>
&gt;<br>
&gt; Message: 4<br>
&gt; Date: Thu, 5 Jun 2008 11:40:08 +0800<br>
&gt; From: truncatei &lt;<a href="mailto:truncatei@gmail.com">truncatei@gmail.com</a>&gt;<br>
&gt; Subject: Re: [PerlChina] 请教perl cgi页面如何显示ls信息<br>
&gt; To: <a href="mailto:china-pm@pm.org">china-pm@pm.org</a><br>
&gt; Message-ID:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:c0d775f40806042040g76f87854re4669cde449a3180@mail.gmail.com">c0d775f40806042040g76f87854re4669cde449a3180@mail.gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt;<br>
&gt; 看下运行这个CGI的用户身份,Apache一般运行在不同的用户帐号下<br>
&gt;<br>
&gt; 2008/6/5 gary.jsz &lt;<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>&gt;:<br>
&gt; &gt; &nbsp;我的代码如下:<br>
&gt; &gt; #!/usr/bin/perl -w<br>
&gt; &gt; #<br>
&gt; &gt; use strict;<br>
&gt; &gt; use utf8;<br>
&gt; &gt; #use CGI qw/:standard/;<br>
&gt; &gt; use CGI qw/:all/;<br>
&gt; &gt; print header,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; start_html(&quot;Mailing list manager system page&quot;),<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; h1(&#39;Maillist&amp;#31649;&amp;#29702;&amp;#31995;&amp;#32479; &#39;),<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; start_form,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;What are you doing?&quot;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; popup_menu(-name=&gt;&#39;choose&#39;,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-values=&gt;[qw(select create delete modify)]),p,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; submit,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; end_form,<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; hr;<br>
&gt; &gt; if(param()){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /select/){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date&quot;;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print `ls -l \$HOME`;<br>
&gt; &gt; #system &quot;ls -l \$HOME&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; if (em(param(&#39;choose&#39;)) =~ /create/){<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system &quot;date -u&quot;;<br>
&gt; &gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt; 其中时间能正确显示,但是,就是不能打印 ls -l $HOME 这行,换成 system &quot;ls -l<br>
&gt; &gt; \$HOME&quot;也不能打印,还希望各位老师能指教,谢谢!<br>
&gt; &gt;<br>
&gt; &gt; ________________________________<br>
&gt; &gt; Gary.jsz<br>
&gt; &gt;<br>
&gt;<br>
&gt; ------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; China-pm mailing list<br>
&gt; <a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
&gt;<br>
&gt; End of China-pm Digest, Vol 38, Issue 3<br>
&gt; ***************************************<br>
&gt;<br>
<br>
<br>
<br>
--<br>
gary<br>
<a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mail.pm.org/pipermail/china-pm/attachments/20080605/da3490df/attachment.html" target="_blank">http://mail.pm.org/pipermail/china-pm/attachments/20080605/da3490df/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
China-pm mailing list<br>
<a href="mailto:China-pm@pm.org">China-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a><br>
<br>
End of China-pm Digest, Vol 38, Issue 4<br>
***************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>gary<br><a href="mailto:gary.jsz@gmail.com">gary.jsz@gmail.com</a>