html - PHP include doen't work inside subfolders -


In my project, I put my file in this folder:

/ test_server /

However, I am creating a group inside my / test_server / css

for my CSS file, the problem is that I want to add a new module for my project, which is called the Scheduler . There are several files in it, so I create another module called this test / test_server / scheduler module.

I have all my navigation menus in the header file. Let's say this file is called wrapper.php. Use this file from my / test_server / css / folder

  & lt; Link rel = "stylesheet" type = "text / css" href = "css / style-fit.css" /> Inside the / test_server / style-fit.css located inside / test_server / css /  

, wrapper.php

Next, I have the / scheduler.php file / Test_server / scheduler / folder

I have tried to use it like $ _SERVER ['DOCUMENT_ROOT'] inside it,

  $ path2 = $ _SERVER ['DOCUMENT_ROOT ']; $ Path2 = "/test_server/wrapper.php"; Include_once ($ Path2);  

It may contain wrapper.php, but the references to style-fit.css are missing.

How to fix this problem?

Thank you.

Have you tried this kind of thing?

  & lt; Link rel = "stylesheet" type = "text / css" href = "/ test_server / css / style-fit.css" />  

This will work completely, if you can successfully include wrapper.php


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -