I have the following folder structure: website.com/index.php website.com/page/asd.php website.com/header.php website.com/js/file.js header.php contains: index.php contains: asd.php contains: So file.js will work on index.php, but file.js doesnt work on asd.php. On asd.php the browser want to get /pages/js/file.js (which doesnt exist) and not /js/file.js How can I handle this problem? Thank you. Answer Start path of your file with / This will
Tag: structure
Project structure for PHP
I am new to PHP and want to know the directory structure for the php projects. I have experience in Java and in java we have src contains java source files, WEB-INF contains lib, and jsp pages. Do we …