0

i have a website which has this structure:

  • /ROOT DIRECTORY/
    • Product/
      • products.php
  • CSS/

    • style.css
  • index.php

so here's the problem: index.php links the style.css with relative path like so "../CSS/style.css"

and products.php includes index.php using include "../index.php"
but the css isn't being included because NOW index.php is in the same folder as products.php so relative path won't work !!
is there any solution a part from absolute path because i don't want people to know the structure of my project if there is not can you give me the absolute path or can i somehow hide the absolute path from the user


thank you in advance for your time

2
  • How would absolute paths reveal something of your structure that can't be deduced from relatives? Or what does the structure even matter? Commented Feb 22, 2017 at 16:19
  • Apart from this: using relative paths carries nearly the same information, apart from the absolute base path. Commented Feb 22, 2017 at 16:25

1 Answer 1

1

try to use this syntax:

<link rel="stylesheet" type="text/css" href="/CSS/style.css">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.