Call to include the director makes a mistake.
-
It's embarrassing to ask a question, but I'm sick of these misunderstandings: the test folder is in the root catalogue. Function
include
challengedmods/mod1/md.php
:include("../test/test.php");
writes a mistake and returns only to the catalogue.
mods
and looking for a file.test
♪ How much do you want to put those damned spots? They mean, if they're two, they're two catalogues back. What am I doing wrong? Or it's only possible.$_SERVER['DOCUMENT_ROOT']
?
-
♪ ♪ - it's a return to the parent directory. You're calling to include (better to use_once) in the file. mods/mod1/md.phpi.e. directory mods/mod1/You need to go to the root and choose another catalogue. test
relevant to the file md.php once ♪ ♪ It's gonna be a transition to the parent director of the folder. mod1 I mean. mods You need to get a little higher on the parent file. mods - it means we use it again. ♪ ♪I mean, we've already had two transitions. ♪ ♪ / ♪ ♪ / - Now we're at the root of the catalog, moving to the right file and violin in it. /test/test.php♪
That's what we did. ♪ ♪ A/test/test.php
Actually, I'd rather use it.
$_SERVER["DOCUMENT_ROOT"]
which gives us the way straight to the root catalogue and move on, that is, the path becomes absolute, which gives you the opportunity to move the file from which you cause.include
in any other catalogue without the need to change the path of the file.