Is it possible to embed PHP using a placeholder or otherwise in a Xara web creation? I tried using an iframe in a placeholder but it didn't go well.
Printable View
Is it possible to embed PHP using a placeholder or otherwise in a Xara web creation? I tried using an iframe in a placeholder but it didn't go well.
Any code snippet can be added using placeholders.
In order for the php to work, the file extension must end in php so the server will parse the file for php or you can specify htm/html files to be parsed for php by using an htaccess file.
How does he do this Chris?Quote:
...or you can specify htm/html files to be parsed for php by using an htaccess file.
There isn't a solution that works on all configurations, so some experimentation would be in order.
You would need to edit or create (if you don't already have an .htaccess file) the file. The dot is required in .htaccess for the name. In it, add or enter:
AddType application/x-httpd-php .html .htm
try it if it doesn't work or you start receiving errors try:
AddHandler application/x-httpd-php .html .htm
OK had a bit of a play. You can indeed drop in some PHP using a placeholder, but it only works if you then save the page itself as a .php and as Sledger says, you can't preview the PHP elements on your PC.
I don't think I fancy playing with the .htaccess file. That's a little out of my comfort zone.