문제

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.

올바른 솔루션이 없습니다

다른 팁

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top