23 Replies
i just donllowd php storm
and when i open xampp i see it wont load any file
it will only load the file u selected
not any style or script
i even unsital php storm
and it still same it only show the index file and not any other thing
my older file are fix
but every new file i create have this problem
i think php storm make me this bug
even in live server for html everything work fine but in xamp ....
it cant read links from other files anyone knwo why
how in hell did you created a file with
/
in the name!??!?!??!😳
i dont
or am i missing something?
it automat add
oh, wait, that's the chrome thing
i dont know what happen but my pc if full of bug rn after i donllowd php storm
i cant do anything wtf
idk why all the links from other file in un readlbel
im linking login style to the index and its not loading any of the files
likely a relative vs absolute path issue
should i unstisal xammp ?
and re donllowd it
no
in the file
/test/index.html
, if you refer to the file /swad/style.css
, it's not going to look for /test/swad/style.css
, but for /swad/style.css
remove the / at the start of your href in your headerif i remove it it wont work .
../
<link rel="stylesheet" href="../login/login.css">
it work now but idk why it happen cuse it was working fine
beffor this
suddenly it glitched
likely because the live server serves the folder you activate it in at the root, and xampp is configured to serve one level higher because you want to use it for multiple projects
learning the differences between absolute and relative paths in HTML is essential and you will have to have a solid understanding of them going forward. I suggest you do some research
ye i have big problem with it i never undestand the diffrent
tnx for help
when the path of the files starts with / in the html file, it will look for the root of where the server is serving from
when it starts with ./ or nothing, it is in the same directory as the html file
when it starts with ../, it is 1 directory above
instead of login/login.css, you have to use ./login.css or just login.css
same for the form action: start with ./ or nothing
tnx for help i know how to use it now i fix all problem i was using it in all the links for mistake
you're welcome