代码显示为文本输出 [英] Code shown as text output

查看:110
本文介绍了代码显示为文本输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Facebook应用程序开发的新手.当显示页面liked.php时(它是在用户喜欢该网站时显示的),PHP代码将作为文本输出显示.

I'm a newbie to Facebook app development. It almost works when the page liked.php is shown (it's shown when a user liked the site), the PHP code is displayed as text output.

我的liked.php代码: 出于隐私原因删除 ?>

my liked.php code: deleted for privacy reasons ?>

以下是输出(显示为空白文本):

Here's the output(it's shown as blank text):

我根本不知道为什么.甚至error_reporting(E_ALL);什么也没显示.只是空白文本输出.我使用最新的facebook php sdk.

I simply don't know why. Even the error_reporting(E_ALL); doesn't show anything. Simply blank text output. I use the newest facebook php sdk.

推荐答案

听起来像没有安装PHP或未使用调用PHP引擎的文件扩展名-您的文件名为[Blah].php吗?

Sounds like you either don't have PHP installed or you're not using a file extension which invokes the PHP engine - is your file called [Blah].php?

一些要检查的东西:

  • 您正在从Web服务器(而非本地)提供文件
  • 服务器已安装PHP
  • 您的网络服务器已配置为使用PHP引擎来处理您正在使用的文件类型(通常是.php或.php4或类似文件)
  • 仅使用<?php phpinfo(); ?>创建一个新文件并提供该文件应会为您提供有关PHP安装的大量信息.
  • 如果您有权访问服务器,则应该能够从命令行/shell运行PHP
  • You're serving the file from a web server (not locally)
  • The server has PHP installed
  • Your webserver is configured to use the PHP engine to handle the file type you're using (usually .php or .php4 or similar)
  • creating a new file with just <?php phpinfo(); ?> and serving it should give you lots of info about your PHP install.
  • If you have access to the server, you should be able to run PHP from the command line/shell

这篇关于代码显示为文本输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆