如何在Windows上通过XAMPP运行Perl文件?
发布时间:2020-12-13 22:55:28 所属栏目:Windows 来源:网络整理
导读:我是Perl语言的新手,我尝试像运行 PHP文件一样运行它,方法是将文件放在htdocs中,然后通过localhost访问它们. 下面是我创建的Perl文件,但无法在localhost上运行: —– hello.pl ————— #!/usr/bin/perl print "Hello World.n"; 安装xampp.在安装过程中,
我是Perl语言的新手,我尝试像运行
PHP文件一样运行它,方法是将文件放在htdocs中,然后通过localhost访问它们.
下面是我创建的Perl文件,但无法在localhost上运行: —– hello.pl ————— #!/usr/bin/perl print "Hello World.n";
>安装xampp.在安装过程中,请确保已检查要安装的perl.
>我假设你已经在c:/ xampp目录中安装了xampp. >现在转到c:/ xampp / htdocs目录.在htdocs目录里面创建一个perl目录.现在在perl目录中,创建一个名为hello.cgi的文件. >在hello.cgi中编写以下代码段. 你好世界节目: #!C:xamppperlbinperl.exe # The above line is perl execution path in xampp # The below line tells the browser,that this script will send html content. # If you miss this line then it will show "malformed header from script" error. print "Content-type: text/htmlnn"; print "Hello world." 现在从xampp控制面板启动apache.在浏览器的url中,输入localhost / perl / hello.cgi. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 像MetroTwit这样的WPF界面
- 使用Win32 API更新许多Windows的Z顺序
- powershell – 如何在Windows 10中从命令行打开/关闭Window
- windows – C#catch kill命令
- windows-server-2008 – NT Eventlog单消息大小
- 是否可以在Windows中执行Objective-C程序?
- Notepad++ 安装NppFtp,方便在Windows上远程打开Linux上的文
- 从uint8_t类型数组中提取位
- 如何正确创建一个nim / nimrod windows dll
- .net – 什么时候需要Windows SDK for MSBuild?
推荐文章
站长推荐
- windows – Delphi XE2将Application.MainForm.H
- windows-server-2008 – Windows Server 2008和S
- windows – 如何查找磁盘是否已精简配置?
- 批量脚本,Powershell,而不是在Windows中触发UAC
- windows-7 – Windows 7 – 组策略 – 允许保存R
- windows-phone-7 – Windows Phone 7设置
- windows-server-2012-r2 – 远程桌面网关MMC在“
- windows – 使用本地驱动器和等效的UNC路径之间是
- windows – 如何使用cmake生成.msi安装程序?
- 在COM dll上使用tlbexp.exe
热点阅读