1
You guys, when I put this on:
$rootPath = realpath("/home/687_332_0/332");
echo $rootPath;
The above example will print: 687_332_0/332 (WORKS!)
However, when I put what’s below, echo does not work:
$rootPath = realpath("/home/".$folder1."/".$folder2);
ou $rootPath = realpath('/home/'.$folder1.'/'.$folder2);
ou $rootPath = realpath("/home/$folder1/$folder2");
ou o mesmo processo com essas variáveis convertidas com strval() ou (string)
$caminho1 = strval($folder1);
$caminho2 = (string)$folder2;
echo $rootPath;
The above example will print: ANYTHING!
Why it happens and how I fix it?
I could check if when accessing this folder php code has privileges for this?
– rray
Yes, you do. Okay.
– Lollipop
In the example you are using,
$folder1
and$folder2
have what values? These variables may possibly have strange characters like spaces, accents, special symbols, ...?– user25930
687_332_0 and 332, as in the question.
– Lollipop