PHP is completely irrelevant for what you are doing. The generated HTML is what counts.
In your case, you are missing the src attribute. Use
<script type="text/javascript" src="file.js"></script>
// simply add this to your head tag or top of your page.
<script src="myscripts.js"></script>