clacker


Group: Members
Posts: 570
Joined: June 2004 |
 |
Posted: Aug. 18 2006,16:58 |
 |
moo_cow22000, I don't know if this helps you but here is a simple example. First create the file below in beaver and call it /home/dsl/test.txt
Code Sample | one two three four |
Then create the file below in beaver and save it to /home/dsl/tut.pl
Code Sample | #!/usr/bin/perl -wT print "Content-type: text/html\n\n"; print "Test Page start<P>\n";
$myFile = '/home/dsl/test.txt'; open(MYFILE,$myFile); @myLines = <MYFILE>; close(MYFILE); print @myLines; print "<br>Test page end\n"; |
Change the permission using chmod 755 /home/dsl/tut.pl
Run these commands to copy that file to /opt/monkey/cgi-bin with the correct permissions: sudo cp /home/dsl/tut.pl /opt/monkey/cgi-bin/tut.pl sudo chown root /opt/monkey/cgi-bin/tut.pl sudo chgrp staff /opt/monkey/cgi-bin/tut.pl
Fire up monkey using the right click menu and choosing System->Daemons->Monkey Web Server->monkey start. Now try to run tut.pl in the command line and as a web page and it should work:
/home/dsl/tut.pl dillo 127.0.0.1/cgi-bin/tut.pl
|