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')); ?>