[英]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.