Simple: PHP inside Google AppScript
<p>I want to create a googlescript which catches the current username in wordpress and writes it into a googlesheet.
For this I plan to:</p>

<ul>
<li><p>implement a googlescript webapp into wordpress</p></li>
<li><p>catch the username via <code>&lt;?php wp_get_current_user(); ?&gt;</code></p></li>
</ul>

<p>My question is very simple:
I have problems getting a simple php action called via AppScript.
My Code.Gs is:</p>

<pre><code>function doGet() {
  return HtmlService
      .createTemplateFromFile('index')
      .evaluate();
}
</code></pre>

<p>My index.html is:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
&lt;? echo "Hello world!"; ?&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Which gives me the error:</p>

<blockquote>
  <p>SyntaxError: Missing ; before statement. (line 2, file "Code")</p>
</blockquote>

<p>What am I doing wrong?</p>

<p><em>(<code>&lt;?php echo "Hello world!"; ?&gt;</code> doens't work too)</em></p>