2
在PHP页面中,如何在不呈现PHP文档的情况下编写PHP文档?什么我试图做在不显示PHP的情况下显示PHP
例子:
<?php _e('Error msg, please manually add <?php echo "whatever"; ?> to this
file, 'my-text-domain'); ?>
在PHP页面中,如何在不呈现PHP文档的情况下编写PHP文档?什么我试图做在不显示PHP的情况下显示PHP
例子:
<?php _e('Error msg, please manually add <?php echo "whatever"; ?> to this
file, 'my-text-domain'); ?>
更换<
和>
字符<
和>
实体字面上显示它们,就像你在普通的HTML:
<?php _e('Error msg, please manually add <?php echo "whatever"; ?> to this file, 'my-text-domain'); ?>
您也可以拨打htmlentities()
功能自动执行此操作:
<?php _e(htmlentities('Error msg, please manually add <?php echo "whatever"; ?> to this file, 'my-text-domain')); ?>