Welcome to TalkGraphics.com
Results 1 to 7 of 7

Thread: PHP

  1. #1
    Join Date
    Sep 2005
    Location
    London, England
    Posts
    520

    Default PHP

    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.

  2. #2
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,044

    Default Re: PHP

    Any code snippet can be added using placeholders.

  3. #3
    Join Date
    Jul 2008
    Location
    Phoenix, AZ
    Posts
    267

    Default Re: PHP

    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.
    Chris
    LotsMoreHosting.com

  4. #4
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,506

    Default Re: PHP

    ...or you can specify htm/html files to be parsed for php by using an htaccess file.
    How does he do this Chris?

  5. #5
    Join Date
    Jul 2008
    Location
    Phoenix, AZ
    Posts
    267

    Default Re: PHP

    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
    Chris
    LotsMoreHosting.com

  6. #6

    Default Re: PHP

    Quote Originally Posted by Jimi King View Post
    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.
    Not sure if you are also aware that .php won't function on a standard Windows machine 'locally' (eg; Xara preview or exported to a folder on your HDD), it has to be uploaded to your PHP enabled host first.

  7. #7
    Join Date
    Sep 2005
    Location
    London, England
    Posts
    520

    Default Re: PHP

    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.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •