繁体   English   中英

如何在 Visual Studio Code 中运行与 PHP 集成的 HTML 代码

[英]How to run a HTML code integrated with PHP in Visual Studio Code

I am using HTML integrated with PHP in Visual Studio Code Editor, where the code will execute as a PHP code and the output thus delivered will be in HTML format and I want the output(preview) for the HTML code. 我已经在很多网站上搜索了这个集成编程和 HTML 和 PHP 并且找不到它。 帮我解决这个问题?

文件扩展名需要为.php

在上述文件中,您可以用<?php开始 PHP 并用?>结束它。 例子:

<div>
    <?php echo("print something in php"); ?>
</div>

另外顺便说一句,谷歌本可以在 3 秒内为您回答这个问题。 下次请检查谷歌是否有可能已经回答的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM