当我尝试将其包含在head部分中时,我的js脚本不包含在我的文件中

I have a header.php file in which I'm adding my scripts file but can't add properly these files works fine in my footer.php file but not working in header.php file.

I need to add them in header so I can run the code in my files too.

I am adding my js scripts jquery with other scripts in my file but it is not working on my page on my console there is no any error but when I check in network i see this message:

Request URL:http://localhost/mvc/public/js/jquery-2.0.2.js
Request Method:GET
Status Code:304 Not Modified

this code works fine when I put it in footer section. But it should work in head section too. here is my code im adding this in head section:

<script type="text/javascript" src="<?php echo URL; ?>public/js/jquery-2.0.2.js"></script>
<script type="text/javascript" src="<?php echo URL; ?>public/js/custom.js"></script>
<script type="text/javascript" src="<?php echo URL; ?>public/js/creditcard.js"></script>

I believe its a strange behavior. But how can I fix it?

Please let me know in comments if this question is not good and not explaining well. Thanks.

304 does not really indicate an error, but rather indicates that the resource for the requested URL has not changed since last accessed or cached.

Try just typing out the hardcoded URL /mvc/public/js/jquery-2.0.2.js as the source URL.