Skip navigation
Currently Being Moderated

Can you embed php code in the index.template.html file?

Apr 3, 2013 12:49 PM

In the html-template folder we find the index.template.html file.   After my recent skirmish with FlashVars, I got to wondering if I could

embed php code in the template.   This would allow me to use php's function to dynamically retrieve the hostname from the server, set

the flashvar and then access that from my flex application.


Anybody know if you can do this?

  • Currently Being Moderated
    Apr 8, 2013 6:02 AM   in reply to ksukat

    Simplest of all is to edit the default launch location to use your php instead.


    For example, I have mine (in one project) set to export debug assets into a directory in my server.local root directory and I have modified the launch location from e:\[project location]\bin-debug\index-template.html to http://server.local/flexdev/[project name]/index.php?somevars...



    Mark as:
  • Currently Being Moderated
    Apr 8, 2013 6:04 AM   in reply to Gaius Coffey

    PS: You know you can also use something like Charles to proxy / swap out release files from your release server with debug files from your test environment? That way, you can do debug testing against a full function environment.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points