title: how to include js file in php?
body: <p>I have a problem with an js file in php.
  if i include it like this:</p>
  
  <pre><code>?&gt; &lt;script type="text/javascript" href="file.js"&gt;&lt;/script&gt; &lt;?php
  </code></pre>
  
  <p>the file isn't included and i get an error that the function isn't defined.</p>
  
  <p>When i try it this way:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  document.write('&lt;script type="text/javascript" src="datetimepicker_css.js"&gt;&lt;/script&gt;');
  &lt;/script&gt;
  </code></pre>
  
  <p>the first  tag in the document.write function closes <code>&lt;script type="text/javascript"&gt;</code></p>
  
  <p>what is the correct way to do this?</p>
  
  <p>thanks, 
  sebastian</p>