繁体   English   中英

perl 500内部服务器错误php包括

[英]perl 500 Internal Server Error php include

我正在尝试使用PHP::Include在Perl中运行PHP文件,但浏览器却收到500 Internal Server Error

这是我的代码:

#!/usr/local/bin/perl

use PHP::Include;
include_php_vars( 'file.php' );
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";

测试您的file.php编译错误。

php file.php

在该文件夹中,测试您正在使用的脚本

perl scriptname.pl

因此将显示std错误(而不是通过CGI运行脚本时看到的一般500错误)。

我注意到您在执行php include之后正在打印标题( print "Content-type: text/html\\n\\n"; )。 根据您的php脚本中的实际情况,标头之前的任何非标头输出都会导致500错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM