开发者

class.openid.php file content is displayed on the page

When I start the page (on my development environment) I see content of a php file content of a class.openid.php on the page.

On 开发者_StackOverflowthe production site everything is ok.

Why that is happening?


Probably, short_open_tag in PHP configuration is set to 0 and your class.openid.php has <? instead of <?php in the beginning of the file.

Open class.openid.php, locate <? at the beginning of the file and replace it with <?php


This normally means that the PHP parser isn't being invoked. (Unless of course other .php files are being loaded correctly.)

As such, you need to check the web server with your development environment to ensure that the necessary content handler and module for PHP is being loaded and that .php files are assigned to that handler, etc.


There are 4 reasons this might happen:

  • Apache handler for PHP is broken (n/a in your case)
  • PHP is somehow broken (n/a in your case)
  • The code uses short open tag (<?...?>) but it's turned off in the server
  • File EOL is somehow broken, typical of FTP clients (change FTP upload type from ASCII/text to binary)*

*You can find this by editing the uploaded file, the code will most likely show up on the same line. If this is the case, I sure hope you have a copy of the file in question :), or else you're have to add the new lines manually yourself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜