The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Shell Access
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 03-15-2004
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
i seriously have to side w/ norsk hedensk on this. we are deffinetly here to help you but its hard to help you if you dont post your code.

being you are trying to get a directory listing via the web in all honesty i dont understand where this would be a needed request, but i do soemthing simmular based on $REMOVE_USER variable passed in from apache.

btw you cant post data w/ spaces in it. use a %20 if your post has spaces.

check the html standard at www.w3.org

but if you are just trying to get a directory listing via cgi.


Code:
#!/usr/bin/perl -w

use CGI qw/:standard/;

print header, start_html($ENV{REMOTE_USER}), h2($ENV{REMOTE_USER}), hr;
@files=glob("*");
for (@files) { print ("<a href=\"$_\">$_</a>", br) };
print end_html;