I want to have my server-side Perl script grab a string that is sent by a client-script (written in Javascript), then save that string into a .txt file, but for some reason, it's not working. I am using AJAX to get the web browser (firefox) to display what the server-side script will display after running (which it does successfully), but I just can't save the string passed in by client-side script using the AJAX .send("string") method.
I was wondering if there is something else (like a special library / software , etc) that I need in my Apache HTTP server to it to write string to .txt file when the code is run on browser.
I am trying to run the code on Apache HTTP server, and the OS I am running the code is Fedora 13. I am running the code on: http://localhost:56789/ajax2.html
(Please see code attached if it will help)
ajax.cgi.txt is the .txt version of the server-side function written in Perl, ran as a cgi program
ajax2.txt is the .txt version of the html page, which runs the Javascript (client-side)
ajax2.js.txt is the .txt version of the client-side script, using AJAX...
Re: Writing string to a .txt file (scripting in Perl)
There's nothing wrong with the PERL code. First off, I would check and make sure that the path is correct. Remove all folders and just write to a text file on the root. See where it goes.
After that I would check for a rights issue.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.