• IIS perl python cbrother php脚本语言配置及简单测试样例程序


    上篇笔记写了 IIS 配置 CGI,

    IIS CGI配置和CGI程序FreeBasic, VB6, VC 简单样例_Mongnewer的博客-CSDN博客

    这篇在IIS上配置一些脚本语言。为了操作方便,每种语言在站点下分设文件夹。

    1. IIS perl配置

    Perl CGI方式是曾经流行的做法。先下载一个开源的 Perl.exe 解释器,在免费的 sambar 服务器套件里打包有它,可以摘出来单独使用。IIS基础配置众人之述备矣,主要是处理程序映射。参照上篇CGI配置,发现主要不同点在于可执行文件的选择,这次它不是空着的,是perl.exe解释器软件的物理地址和解释器执行文件名,在它的后面加上两个形参 %s %s

    配置完成后写下面的的perl文本,取名 hello.pl,放到 cgi-pl 下面,然后在浏览器上访问它,

    1. print "Content-type:text/html\n\n";
    2. print ""</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">print</span> <span class="hljs-string">"Friends CGI Demo (dynamic screen)"</span>;</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-keyword">print</span> <span class="hljs-string">"";
    3. print "";
    4. print "

      Hello World From Larry Wall - Perl 5.8

      "
      ;
    5. print "";

     比如 http://192.168.3.113:8087/cgi-pl/hello.pl , 浏览器会显示

    2. IIS python配置。

    IIS python配置与IIS perl配置只是解释器不同,其它相同。

    然后写一段简单的python,

    1. print('Content-Type: text/html\n\n')
    2. print('')
    3. print('Hello World')
    4. print('"utf-8">')
    5. print('')
    6. print('')
    7. print('

      Hello World, CGI!

      ')
    8. print('')
    9. print('')

    浏览器访问它,结果就出来了。

    3. IIS cbrother脚本配置。

    cbrother是国人免费软件,速度和功能很好,跨平台的脚本语言。下载一个放到一个文件夹即可用。配置方法和perl, python是一样的。写一段测试程序,输出结果有了则验证了配置是可用的。

    1. function main(param)
    2. {
    3. print "Content-Type: text/html\n\n";
    4. print "";
    5. print "Hello World";
    6. print "";
    7. print "";
    8. print "";
    9. print "

      Hello World, CGI!

      "
      ;
    10. print "";
    11. print "";
    12. }

    起个名字 hello.cb 存起来,访问它并返回如下结果。

    4. 新版php配置也可以用类似的方法,但稍有不同。

    VBscript和JavaScript脚本不用配置,配合asp直接使用比较方便,在server端它们都可以用,返给浏览器的是结果,但VBscript在现在的客户端浏览器中几乎都不支持使用了。

  • 相关阅读:
    性能测试 —— Jmeter 命令行详细
    Oracle之删除数据之后如何恢复的方法
    【nlp】2.3 LSTM模型
    如何优雅地校验后端接口数据,不做前端背锅侠
    精心整理170道Python面试题,建议收藏!
    数据驱动农业农村现代化-国稻种芯-万祥军:谋定标准化生产
    C语⾔内存函数
    求逆元的3种方法(数论)(同余)
    怎么把图片转文字?掌握这个技巧,帮你解放双手
    OpenHarmony其他工具类—lua
  • 原文地址:https://blog.csdn.net/weixin_45707491/article/details/132650797