storing the data entered in a text file using perl cgi? -



storing the data entered in a text file using perl cgi? -

i have installed boa server on arm. , writing cgi script can info user( on other pc on same network ) , save in text file in arm.

here cgi file, store info in text file need utilize "use cgi" info entered when uncomment on code error 502 bad gateway cgi not cgi/1.1 compliant. need help!

#!/usr/bin/perl utilize strict; utilize warnings; #use cgi; print "content-type: text/html\n\n"; #open (myfile, '>>guestbook.txt'); # print myfile "1111111\n"; # close (myfile); print <<"eof"; <html> <head> <title>hello, world!</title> <p id="demo"></p> <script type="text/javascript"> function copytext() { document.getelementbyid("field2").value=document.getelementbyid("field1").value; document.getelementbyid("demo").innerhtml = date(); } </script> </head> <body> <h1>hello,</h1> come in email address: <input type="text" id="field1" value="hello1 world!"><br> field2: <input type="text" id="field2"> <br><br> <button onclick="copytext()">copy text</button> </body> </html> eof

502 bad gateway cgi not cgi/1.1 compliant

usually error comes due permissions. seek add together read , execute access rights others.

chmod o+rx yourscript.cgi

perl

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -