xampp problem

hello
23 Replies
NIMA
NIMA5d ago
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
NIMA
NIMA5d ago
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
ἔρως
ἔρως5d ago
how in hell did you created a file with / in the name!??!?!??!
NIMA
NIMA5d ago
😳 i dont
ἔρως
ἔρως5d ago
or am i missing something?
NIMA
NIMA5d ago
it automat add
ἔρως
ἔρως5d ago
oh, wait, that's the chrome thing
NIMA
NIMA5d ago
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
NIMA
NIMA5d ago
im linking login style to the index and its not loading any of the files
Jochem
Jochem5d ago
likely a relative vs absolute path issue
NIMA
NIMA5d ago
should i unstisal xammp ? and re donllowd it
Jochem
Jochem5d ago
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 header
NIMA
NIMA5d ago
if i remove it it wont work .
NIMA
NIMA5d ago
../ <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
Jochem
Jochem5d ago
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
NIMA
NIMA5d ago
ye i have big problem with it i never undestand the diffrent tnx for help
ἔρως
ἔρως5d ago
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
NIMA
NIMA5d ago
tnx for help i know how to use it now i fix all problem i was using it in all the links for mistake
ἔρως
ἔρως5d ago
you're welcome
Want results from more Discord servers?
Add your server