简单的PHP回显代码不起作用 [英] Simple PHP echo code not working

查看:92
本文介绍了简单的PHP回显代码不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的带有php脚本的html:

Here is my html with a php script:

  <html>
      <head>
    <title>Bob's Auto Parts</title>
  </head>
  <body>
    <h1>Bob's Auto Parts</h1>
     <table width = 100% >
         <tr>
             <?php
                 echo "<td>This is working.</td>";
             ?>
         </tr>
     </table>
  </body>
 </html>

为什么此输出显示为;? ?>.我希望它是正在运行".只要.这是输出

Why is the output of this appearing with a ; ?>. I want it to be 'This is working.' only. Here is the ouput

鲍勃的汽车配件

鲍勃的汽车配件

这是有效的.; ?>

Bob's Auto Parts

Bob's Auto Parts

This is working."; ?>

我知道我在这里做错了,但无法解决.提前致谢.

I know I am doing something wrong here but not able to figure it out. Thanks in advance.

推荐答案

这些(或更多)中的任何一个都可能是您的答案,为什么它不起作用

Any of these (or more) could be your answer why it is not working

  1. 您的计算机上实际上有运行PHP吗?
  2. 文件扩展名是.php吗?
  3. 您是否正在通过浏览器访问文件,例如执行http://localhost/myfile.php
  4. 如果在远程服务器上,是否安装了PHP?
  1. Is there actually PHP running on your computer?
  2. Is the file extension .php?
  3. Are you accesing the file through your browser doing something like http://localhost/myfile.php
  4. If it is on a remote server, is there PHP installed?

这篇关于简单的PHP回显代码不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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