I have directory structure like this:
- index.php
- templates(directory)
- login.php
- header.php
- js(directory)
- jquery.min.js
I include script jquery.min.js
in header.php
, then I include header.php
in login.php
, but the path to jquery.min.js
brokes. How I try to solve it by replace this:
<script src="js/jquery.min.js">
to this
<script src="<?php echo dirname(__FILE__)?>js/jquery.min.js">
but then I get this path to resourse:
http://localhost/var/www/auth/js/jquery.min.js
And again 404 error. Can somebody explain to me how I can solve this issue.