【问题标题】:How to run perl script on linux server, which is operated by cPanel?如何在由cPanel操作的linux服务器上运行perl脚本?
【发布时间】:2011-03-28 17:39:21
【问题描述】:

谁能告诉我如何在服务器上运行 perl 脚本。 我使用FTP上传它。通过在 cgi-bin 文件夹中添加 .pl 文件,脚本不起作用。我也试过用 cPanel 上传。

BEGIN {
   my $base_module_dir = (-d '/home/username/perl' ?
   '/home/username/perl' : ( getpwuid($>)
   )[7] . '/perl/');
  unshift @INC, map { $base_module_dir . $_ } @INC; }

对于最后一个选项,我什至尝试添加

#!/usr/bin/perl

在脚本的开头。

我还能尝试什么?

【问题讨论】:

标签: perl cpanel cgi-bin


【解决方案1】:

你可能需要设置执行位:chmod +x filename.pl

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-02
    • 2019-05-24
    • 1970-01-01
    • 1970-01-01
    • 2012-11-28
    • 2019-12-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多