-1

I am working on some sort of blogging platform in php with a nice material design lite frontend. However I have a page that dynamically loads the content, it works fine in the root directory, but not in my admin directory. I hope you can spot some kind of error/typo in my code, I know the error is in the menu-start file, since disabling it enables loading.

Here is the page that loads the code and here is the menu-start page

If you need any other code, please ask

1 Answers1

1

You're using relative links for include, which will mess up when you start changing directories. Use a pseudo-absolute path with DOCUMENT_ROOT. Be sure to use this for all of your includes.

<?php include $_SERVER['DOCUMENT_ROOT'].'/menu-start.php'; ?>
aynber
  • 22,380
  • 8
  • 50
  • 63