Welcome to TalkGraphics.com
Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Nov 2009
    Location
    Miami, FL USA
    Posts
    14

    Thumbs up php code before html

    I am a Xara Xtreme 5 advanced user and would like to insert php code in a placeholder or using any other method (from xx5 or xwd) before the <html> tag.

    I have used the <head> command in placeholders (Thanks covoxer) and use it extensively, but for a certain script I need to insert code before the <html> tag.

    It would be nice to have a list of tricks for placeholders targeted to PHP programmers like myself.

    Xara Xtreme is amazing!!

    Thanks
    Last edited by perseus; 09 November 2009 at 07:00 PM.

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

    Default Re: php code before html

    If you are a php programmer, it shouldn't be any problem to just open up the html file with a text editor and insert the php code you need.
    Chris
    LotsMoreHosting.com

  3. #3

    Default Re: php code before html

    Chris, the problem with this approach is that each time you re edit/update your main .xar or .web file and re export, those hand edits are lost.
    Placeholders preserve inserted scripts and snippets.

  4. #4
    Join Date
    Nov 2009
    Posts
    10

    Default Re: php code before html

    Hear, hear, Perseus. I have the same probelem (and have accidentally started another thread on the subject). The guy who said a competent php programmer should be able to had edit clearly hasn't tried this with dozens of files where the intiial code is overwritten by Web Designer. IN my case (prob yours too) I need session_start() before any html code (in fact before anything). It's so annoying it's stopping me using Web Designer for some projects that I would otherwise be real happy to use it on. Come on Xara give us a fix!

  5. #5
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: php code before html

    We'll cerainly shall.
    John.

  6. #6

    Thumbs up Re: php code before html

    I suppose you export your page into .htm ?

  7. #7
    Join Date
    Nov 2009
    Location
    Miami, FL USA
    Posts
    14

    Default Re: php code before html

    dcollard,

    You are absolutely right, that is my case also with sessions and exporting dozens of files. Additionally when we use the header for redirections and for many other functions we need to have php before html.

    Covoxer, thanks for taking care of that.

    ab29, when I export the files even if I name the first page index.php it is exported as index.htm or index.html they are the only options for the first page, if someone knows how to export direct to index.php please let us know. The other pages (In a multipage design) will be exported with the php extension without problems.

    Sledger, you are right also.

  8. #8
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: php code before html

    Quote Originally Posted by perseus View Post
    if someone knows how to export direct to index.php please let us know. The other pages (In a multipage design) will be exported with the php extension without problems.
    Just insert a dummy first page.
    John.

  9. #9
    Join Date
    Nov 2009
    Location
    Miami, FL USA
    Posts
    14

    Default Re: php code before html

    Just insert a dummy first page.
    It didn't cross my mind ....cool solution ...he he

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

    Default Re: php code before html

    dcollard

    There is probably a very good reason why this will not work, I am only slightly familiar with PHP but why not create a PHP file with the session_start() code on the first line and drop in the Xara output as an include file?

 

 

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
  •