In some files require '/app/' works, in some doesn’t, but require 'app/' works in those pages where '/app/' breaks. Why is that? I can’t use __DIR__, because it can’t load .css files then
In some files require ‘/app/’ works, in some doesn’t, but require ‘app/’ works in
Share
it’s because there are 2 types of Unix path’s:
absolute path:
/app/(always begins with/)relative path:
app/(relative to the place where you are. has no/in the beginning)Imagine that you are in
/var/wwwIf you use
/app/(abosolute) – you talk about/app/folderIf you use
app/(relative to the palce where you are) – you talk about/var/www/app/. It means that you want to use directory “app” in/var/www/directory.