Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Oct 2010
    Location
    Pearland, TX 77581
    Posts
    36

    Default using php with Xara

    What's the best way to integrate php scripts with Xara?

    Can I get my server to parse all htm files as though they were php files?

  2. #2

    Default Re: using php with Xara

    On a linux host, HTML files using a PHP file extension will be processed by the PHP interpreter. Without PHP actually included, the HTML directives in the file will be processed just fine. If there are PHP includes or other commands, as long as the syntax is OK, the html portion is also processed fine.

    Take care, Mike

  3. #3
    Join Date
    Aug 2010
    Posts
    533

    Default Re: using php with Xara

    You will need to add the extension '.php' to the page name Page and Layer Gallery >> Rename . You will need to leave at least one page as is '.htm' this can be a blank page(required by Xara)
    You can then add PHP using placeholders to those pages

  4. #4
    Join Date
    Oct 2010
    Location
    Pearland, TX 77581
    Posts
    36

    Default Re: using php with Xara

    Many thanks jamesd. It seems so simple now that I've got it working!

  5. #5
    Join Date
    Feb 2013
    Location
    Florida
    Posts
    21

    Default Re: using php with Xara

    Ugh! First let me thank you for this info! (& gwpriester for directing me here!) Second..... NO thanks to Xara for not including this in their latest help file. It was a nightmare searching for "xara php" for hours via google and various xara forums with not one relevant result to this question! The help file only mentions you can name individual pages (duh) and only gives an example of index.htm or home.htm..... not one word about page extensions.

    thank you, thank you, thank you again,

    Quote Originally Posted by jamesd View Post
    You will need to add the extension '.php' to the page name Page and Layer Gallery >> Rename . You will need to leave at least one page as is '.htm' this can be a blank page(required by Xara)
    You can then add PHP using placeholders to those pages

  6. #6
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,650

    Default Re: using php with Xara

    That's why we're here.

  7. #7
    Join Date
    Jan 2004
    Location
    Holland Patent, NY, USA
    Posts
    605

    Default Re: using php with Xara

    Another option, rather than rename your .htm files to .php is to configure your server to parse htm files as php script.

    See here

    and here.

    Then you only have to include you php code in your Xara exported html via placeholders and upload as normal.

  8. #8
    Join Date
    Oct 2012
    Location
    Texas
    Posts
    113

    Default Re: using php with Xara

    Here is a post in the Xara Knowledgebase FAQ section:

    http://support.xara.com/index.php?_m...articleid=2765

    Here is what it says:

    The first page within your document will always be exported with either a .htm or .html extension. Web Designer allows you to export all subsequent pages with any file extension. Open the Web properties dialog and select the Page tab. Apply the page name and extension within the Page filename field.

    Their customer support people sent me that link when I asked them if I could use php pages.

  9. #9
    Join Date
    Jan 2015
    Location
    Spain
    Posts
    6

    Default Re: using php with Xara

    Quote Originally Posted by mwenz View Post
    On a linux host, HTML files using a PHP file extension will be processed by the PHP interpreter. Without PHP actually included, the HTML directives in the file will be processed just fine. If there are PHP includes or other commands, as long as the syntax is OK, the html portion is also processed fine.

    Take care, Mike
    I thank you for this gem of information. I had some PHP code that ran like clockwork but I could not get it running in Xara 10. I could not understand why it would not work. It took 3 minutes after I had read your piece. Thank you, you saved my sanity.

  10. #10
    Join Date
    Mar 2017
    Posts
    2

    Default Re: using php with Xara

    Quote Originally Posted by Brazen View Post
    Ugh! First let me thank you for this info! (& gwpriester for directing me here!) Second..... NO thanks to Xara for not including this in their latest help file. It was a nightmare searching for "xara php" for hours via google and various xara forums with not one relevant result to this question! The help file only mentions you can name individual pages (duh) and only gives an example of index.htm or home.htm..... not one word about page extensions.

    thank you, thank you, thank you again,
    am new to talk graphics, and to web design. I have read extensively docs on the web and found easy to inject html and css to xara 365. Unfortunaltly i am stuck with the php code and do not seems to get the grasp of it.

    Each time I am trying to rename the htm page into a php, when the site is published it revert to an htm. I have created a new folder with the php page that i copy/paste but it doesn't seems the right solution.

    I have tried also to include some simple code in an html placeholder see below and publish, but not working either.

    I would be grateful if one of the experienced user has a step by step solution to help me with. I will not be offended if i am explained like a 8 year old ! I have read most on the subject and may be I do something wrong, renaming a file seems easy.

    Thank you for any assistance.

    <!DOCTYPE html>

    <html>
    <head>
    </head>
    <body>
    <b>
    <?php
    echo “hello world”;
    ?>
    </b>
    </body>
    </html>

 

 

Tags for this Thread

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
  •