Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

What does "language module PHP" actually do?

I checked the language module PHP in my desktop app,
but no PHP code works. I have noticed several other postings from frustrated people wondering how to make PHP work.

What does checking "language module PHP" actually do?

How do you run PHP code in a desktop app?

– David Jones

— asked May 30th 2010 by David Jones
  • demo
  • desktop
  • example
  • howto
  • module
  • php
0 Comments

2 Answers

  • Checking the PHP module allows you to use PHP code in your application. You can either code it inline (not preprocessed):

    <script type="text/php">
    $foo = 'bar';
    $document->write($foo);
    </script>
    

    Or include pre processed scripts:

    <script type="text/php" src="path/to/file.php">
    

    or

    <script type="text/php">
    include('path/to/file.php');
    </script>
    

    More information can be found on the Programming Guides

    — answered June 21st 2010 by Logan Mortimer
    permalink
    1 Comment
    • On Mac snow leopard, using Appcelerator 1.2.1
      The first works:

      <script type="text/php">
      $foo = 'bar';
      $document->write($foo);
      </script>
      

      Other two do not.

      I might be mistaken, yet a simple statement such as:

      echo("hellow world");
      

      does not work. So indeed, what's the PHP language module all about?

      — commented October 24th 2010 by dirk dorme
  • At vista the first one works too. But the other ones do not work !

    Is someone able to say why ??

    — answered February 17th 2011 by M. S.
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.