Hello,
it is possible to insert PHP code within an HTML file. Here is selected HTML as syntax. You can only badly differentiate the PHP Code and HTML Code. If I now PHP code comment on, the code is not recognized as a comment.
Can we improve that, please?
Thank you, Stumpi.
PHP code within an HTML file in WeBuilder
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Re: PHP code within an HTML file in WeBuilder
You can't put PHP code in HTML file. You can put HTML code in PHP file but not vice versa.
Blumentals Software Programmer
Re: PHP code within an HTML file in WeBuilder
Why not? Example:
This ist the default code when I create a new html file with WeBuilder.
Stumpi
Code: Select all
<!DOCTYPE html>
<html>
<head>
<title>Hello!</title>
</head>
<body>
<?php
echo("Hello, World!");
?>
</body>
</html>
Stumpi
Re: PHP code within an HTML file in WeBuilder
It looks like PHP file, not HTML file... What's going on, do you get this code by clicking menu File -> New -> HTML?
Blumentals Software Programmer
Re: PHP code within an HTML file in WeBuilder
Sorry, my mistake. That's what happens when I have highlighted
in any open file and then create a new HTML-File. The new file is an PHP-file, not HTML. You're right. Apologies, I have seen wrong.
Stumpi
Code: Select all
<?php
?>
Stumpi