How to execute PHP code from within javascript escape/unescape?
<pre><code> &lt;Script Language='Javascript'&gt; &lt;!-- document.write(unescape('&lt;?php if ( ! defined('PROJECTNAME')) exit(''); ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;   &lt;/body&gt; &lt;/html&gt; ')); //--&gt; &lt;/Script&gt;
</code></pre>

<p>I did not copy paste the whole code. There is more PHP code within the javascript.  How to make the browser understand that the php code is php and not treat it as a part of a html code?</p>

<p>EDIT:</p>

<p>Someone I know is asking me to make it hard for bots/novice users to steal source code. Please don't ask me why. </p>

<p>Now, to appease that person I tried encoding and it worked beautifully.
Converting everything into %C%22%2F</p>

<p>Now the problem is that it contains php code and that is being encoded. Now if only it took variables from the url and worked like how php should work, then everything will be perfect. </p>
