【问题标题】:Internal Server Error on using python on web server with cpanel在带有 cpanel 的 Web 服务器上使用 python 时出现内部服务器错误
【发布时间】:2013-08-14 09:46:54
【问题描述】:

我是 python 新手。我有面板。我已经编写了这个基本代码并上传到我的网络服务器上的 cgi-bin 文件夹中

#! /usr/bin/python
 print "Content-type: text/html\n\n"
 print "<html>Hello world!</html>" '

但在浏览器上执行此页面时,它会给出

内部服务器错误

我已将脚本的权限更改为 777,但仍然无法正常工作。

【问题讨论】:

    标签: python python-2.7 python-3.x webserver cpanel


    【解决方案1】:

    尝试直接从 python 控制台运行该代码..

    您应该会看到这个 SyntaxError: EOL while scanning string literal

    print "<html>Hello world!</html>" 
    

    你有一个额外的'

    【讨论】:

    • 感谢您的早期倡议。我已经整理好了。我在同一个文件夹中添加了一个新的 .htaccess,它开始工作了。
    猜你喜欢
    • 1970-01-01
    • 2011-11-14
    • 2021-10-07
    • 2020-12-18
    • 1970-01-01
    • 1970-01-01
    • 2016-02-04
    • 1970-01-01
    • 2011-03-04
    相关资源
    最近更新 更多