Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Problem with ipage server I want to use PHP inside XML. I create some XML file and everything is OK on my local WAMP server. But online (on ipage server) just problem. I include AddHandler

@Shakeerah822

Posted in: #Php #Xml

I want to use PHP inside XML. I create some XML file and everything is OK on my local WAMP server. But online (on ipage server) just problem.
I include

AddHandler application/x-httpd-php .xml


in .htaccess file. I saw server can't see something like

<src lang='en'><?php echo "files/en/strana1.jpg"; ?></src>


This is part of XML file.
But this cod work perfekt in localhost WAMP server. How to echo/print some text with PHP inside XML??? Maybe problem is in server configuration or ...

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pope3001725

Make sure that short tags are disabled in your production environment as <? is used by PHP and XML and will conflict when you use the two together. WAMP has short tags disabled by default but most web hosts do not to ensure greater compatibility with older PHP scripts.

Since the odds are you won't be able to change the php.ini file of your host you can try to change this in your htaccess file by placing the following line in it:

php_value short_open_tag 0

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme