Использование Perl для изучения HTML-форм

Я следил за своей книгой и я -

1 - Установленный веб-сервер Abyss, персональная версия.

2 - Скопировал файл книги echo.pl в папку htdocs веб-сервера. Перезагрузил веб-сервер.

3 - Установлен активный Perl. (На самом деле, это уже было. Я не знаю, кто это поставил.)

Когда я перехожу по ссылке - http://localhost/echo.pl, я либо вижу файл perl (Internet Explorer), либо загружаю файл perl (chrome). Я хочу, чтобы этот сценарий обрабатывал все запросы из моих HTML-форм. Как мне это сделать ?

Спасибо.


person Steam    schedule 21.12.2014    source источник


Ответы (1)


Мне просто повезло. Я понятия не имел, что мне делать. Я бродил по их веб-сайту, чтобы немного о них почитать. Мне было интересно, кто будет использовать этот непонятный веб-сервер, когда есть apache. К счастью, я увидел раздел «Помощь и поддержка». Там я увидел поддержку языков сценариев, и в списке был упомянут perl. Я щелкнул ссылку и получил инструкции для своей системы Windows. Вот он - http://www.aprelium.com/abyssws/perl.html

Download and install Perl

Download ActivePerl from http://www.activestate.com/Products/ActivePerl and install it.
Declare the interpreter

Open Abyss Web Server's console. In the Hosts table, press Configure in the row corresponding to the host to which you want to add Perl support.
If there is no Hosts table in the main screen of your console, this means that you are using an old version of Abyss Web Server. Please upgrade to the latest version before proceeding. Upgrading is free, straightforward, and preserves your current server configuration. Click here to download the latest version.

Select Scripting Parameters.
Check Enable Scripts Execution.
Press Add in the Interpreters table.
Set Interface to CGI/ISAPI.
Note that if you do not find an Interface field, you can ignore this step and continue with the following instructions.

In the Interpreter field, press Browse..., go to the directory where you have installed Perl, click on the bin subdirectory, and click on perl.exe.
Check Use the associated extensions to automatically update the Script Paths.
Press Add in the Associated Extensions table.
Enter pl in the Extension field and press OK.
Press again Add in the Associated Extensions table.
Enter cgi in the Extension field and press OK.
Press OK
Press OK in the Scripting Parameters dialog.
Declare new index files

Select Index Files.
Press Add in the Index Files table.
Enter index.pl in the File Name field and press OK.
Press again Add in the Index Files table.
Enter index.cgi in the File Name field and press OK.
Apply the modifications

Press Restart to restart the server.
person Steam    schedule 21.12.2014