Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1

    Default How do you add a PHP script

    In my current PHP site in the header I've added some PHP code to display the following:
    "Today is Thursday 24th of February 2011"

    The script automatically updates the day, date, month and year.

    In PHP I can do with <?php print "Today is " .date("l dS of F Y");

    How do I do the same with XWD 6?
    jgt

  2. #2
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: How do you add a PHP script

    You can use a placeholder for your php code.

  3. #3

    Default Re: How do you add a PHP script

    Quote Originally Posted by xtom View Post
    You can use a placeholder for your php code.
    OK I did the placeholder and I'm confused by the results.
    1. On the webpage I see the PHP code. See http://precisionmarbleinc.com/produc...ne-granite.htm How do I get the PHP code to execute? The PHP code works on my current site.
    2. This item was repeated on all pages. I've clicked on update on all pages but the update is not appearing on the other pages, I have the same problem with the menu.
    3. On one of my test pages I do see the PHP code but it is a couple of layers deep and did not replace the original code (see http://precisionmarbleinc.com/produc...ent-strips.htm)


    I thought I understood the repeat on all pages and the update repeating objects but obviously I don't. I've reread the help section on this and I fail to see what I'm doing wrong.
    jgt

  4. #4
    Join Date
    Dec 2010
    Location
    Kristiansand, Norway
    Posts
    165

    Default Re: How do you add a PHP script

    1. To get php processed you need to name the file .php instead of .htm
    2. Tha puzzles me too. It looks like you need to "kickstart" it somehow by copy/pasting the first time? Or to have the second page created before adding the Repeating: name?

  5. #5

    Default Re: How do you add a PHP script

    Quote Originally Posted by bjornkn View Post
    1. To get php processed you need to name the file .php instead of .htm
    2. Tha puzzles me too. It looks like you need to "kickstart" it somehow by copy/pasting the first time? Or to have the second page created before adding the Repeating: name?
    I finally learned about the rename of .htm to .php but I don't know that once this is done will I have to always do the rename anytime I change something via XWD? If I do this is a nightmare.

    As I understood the repeat option. I can select anything then in the menu click Arrange > "Repeat on all pages". Then any time it is changed on any page all I have to do is click Arrange > "Update Repeating Objects" (this no longer seems to work for me).

    I'm still in the steep learning curve (darn). The simple stuff is easy and XWD is great but when it starts getting into the complicated stuff you gotta know the secrets and I'm somewhat clueless.
    jgt

  6. #6

    Default Re: How do you add a PHP script

    OK I found an old post that gave me the answer and I now have it working on my site.
    jgt

  7. #7

    Default Re: How do you add a PHP script

    I created a new post with the solution, see http://www.talkgraphics.com/showthre...n-of-your-page
    jgt

 

 

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
  •