Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2013
    Posts
    8

    Default using PHP in HTML

    Hello,
    I recently bought WD MX Premium and till now I found evrything I need in the help files and the forum. Tx for this community which seems to be very active and nice to talk to. I am french but you certainly already notice that. Just to apologize in advance for the quality of my futures explanations ! But I will try to do my best.
    So, I did a site working properly but I had to put some very easy php code to open an log.txt to register a few details. The index.htm page which includes the php code should be changed in index.php. I am wondering how this is working with WDMXP ? is it possible ? and if so how ?
    First I tried to search in the forum with "php" or "PHP" as well as in the help files and the manual but nothing came out.
    Can you help me ?
    Thanks in advance

  2. #2

    Default Re: using PHP in HTML

    Insert php code into a placeholder via the "Replace with html" section of the Web Properties dialogue box. Any page having this code must have the .php extension, which you can also change/add in Web Properties. If this page is destined to be the first on your site - the index page - then in Xara leave the first page blank and start on page 2 [naming it index.php preferably] as Xara automatically makes the first page index.htm - you will have to remove that initial page after export.

  3. #3
    Join Date
    Jan 2013
    Posts
    8

    Default Re: using PHP in HTML

    Tx for your reply.
    Before my post, I insert php code in Web Properties dialogue box/Page/Code HTML Head. What is the difference with your proposal "Insert php code into a placeholder via the "Replace with html" section of the Web Properties dialogue box"?
    I understand that I have to change directly the page named "Index" in "Index.php" in Web Properties dialogue box/Page/Name. Is that right ?

  4. #4

    Default Re: using PHP in HTML

    Quote Originally Posted by fiwip View Post
    Tx for your reply.
    Before my post, I insert php code in Web Properties dialogue box/Page/Code HTML Head. What is the difference with your proposal "Insert php code into a placeholder via the "Replace with html" section of the Web Properties dialogue box"?
    Both are correct depending on the function of the PHP you are using and whether you need the code on one page or all pages of your website.

    Quote Originally Posted by fiwip View Post
    I understand that I have to change directly the page named "Index" in "Index.php" in Web Properties dialogue box/Page/Name. Is that right ?
    Correct.
    Any page with PHP code needs to have the .php extension for the server to process as required.

  5. #5
    Join Date
    Jan 2013
    Posts
    8

    Default Re: using PHP in HTML

    Sorry, just once more to be sure.
    a/ insert code in Web Properties dialogue box/Page/Code HTML Head ==> code on one page
    b/ insert code in Web Properties dialogue box/Site Web/Code HTML Head ==> code on all pages
    and
    c/ insert code in Web Properties dialogue box/Placeholder/Code HTML Head ==> code on one page as in a/
    This was your proposal to insert php code... I read it was for gadgets.

    Can you clear this point ? I can't get it ? Is my php code a "gadget" ? Why not a/ ?

    Tx again for your help

  6. #6

    Default Re: using PHP in HTML

    Quote Originally Posted by fiwip View Post
    c/ insert code in Web Properties dialogue box/Placeholder/Code HTML Head ==> code on one page as in a/
    This was your proposal to insert php code... I read it was for gadgets.

    Can you clear this point ? I can't get it ? Is my php code a "gadget" ? Why not a/ ?
    You must mean Widgets?
    Not at all. You may use the placeholder method for any body code snippet that produces a visible result on the page when published, or any head code that you need to use.

  7. #7
    Join Date
    Jan 2013
    Posts
    8

    Default Re: using PHP in HTML

    Quote Originally Posted by sledger View Post
    You must mean Widgets?
    yes, french translation
    Not at all. You may use the placeholder method for any body code snippet that produces a visible result on the page when published, or any head code that you need to use.
    Ok I understand so what is the difference with a/ ? is there any ?
    tx again

 

 

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
  •