doulun1915 2014-02-20 01:32
浏览 36

在Aptana中使用带有html的php

This is my first time using php. I am having a little trouble starting out simple such as just printing "hello world" through php inside an html document. I have an html document with various elements in it and when I print

  <?php echo "hello world" ?>

The html document won't accept the php tags. I have read that html docs won't accept php tags, if this is true how do I integrate php and html? If I just use a php file aptana won't allow me to preview the document.

  • 写回答

1条回答 默认 最新

  • drduinfu915094 2014-02-20 01:35
    关注

    Change the file extension from HTML to PHP. View it in the browser instead of inside Aptana. Also add a semi-colon to the end of the string.

    <?php echo "Hello World"; ?>
    

    It sounds like you need to read a really basic tutorial on setting up a webserver locally by the way.

    XAMPP is pretty popular so take a look at this guide: https://www.udemy.com/blog/xampp-tutorial/

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度