In a php class, assuming the js file is in the same directory, but I can never predict where the two files will be located on the server, how do I make sure the js file is properly referenced?
This doesn't work at all:
function import_script() {
?>
<script src="<?php echo(__DIR__); ?>\myscriptfile.js"></script>
I hope this is clear enough - enough code foryou to see what I'm trying to do. Feel free to request more and I'll edit the question.