Welcome to TalkGraphics.com
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Hybrid View

  1. #1

    Default Re: using php with Xara

    If you read through the links above, all the information is there, but to put it simply you have the following choices;
    * in xara, change names of pages to end with .php (this can work for all pages except the first one which could just be a dummy page)
    * make changes to your .htaccess file so that the .htm files get processed by php
    As you probably realise, changing filenames afterwards is futile and internal links won't work anyway.
    You wouldn't need all that HTML, as that would already be generated by xara, assuming you are inserting this code in a html placeholder it would already be in the body section

    Edit - oops, didn't see there was a page 2 already!

  2. #2
    Join Date
    May 2017
    Posts
    1

    Default Re: using php with Xara

    Hi ya camcap,

    This is what I did to finally get it to work

    1. I had to change the .htaccess file in my servers root directory, add the following:

    AddType application/x-httpd-php .htm .html

    Then I added a rectangle to the page I was working on in Xara 365.
    Then I clicked utilities/webproperties while the rectangle was selected
    Then I went to placeholder/replace with html BODY
    I added the code
    <?php
    echo “hello world”;
    ?>

    And it worked, I hope this helps you

    Cheers

  3. #3

    Default Re: using php with Xara

    I am also interested to learn more. Don't understand why there is no reply. Did you find a solution ? DId you try what was suggested by jamesd above ?

  4. #4
    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.

 

 

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
  •