Answer the question
In order to leave comments, you need to log in
Executing php inside xml file?
Hey!
How to execute php script inside xml file?
Writes an error to the checkbox "<"
Template
<?xml version="1.0" encoding="UTF-8"?>
<option><?php echo $tmp[7] ?></option>
<?php header('Content-Type: application/xml; charset=utf-8'); ?>
<![CDATA[ <?php echo $tmp[7] ?> ]]> // Не выполняется php, просто выводится текстом
<?php echo "<?xml version="1.0" encoding="UTF-8"?>"> // Выдает ошибку страницы
Answer the question
In order to leave comments, you need to log in
In .htaccess:
AddType application/x-httpd-php .php .xml
php_flag short_open_tag off # чтобы PHP не матерился на <?xml ... ?>
location ~* \.(php|xml)$ {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question