Some hosting apache set up the site document root as "/site1/www/" instead of "/site1/www".
Should it be better to use "/site1/www"? For SEO reason? Or it is the same for SEO?
My question is that when we called the variable, $_SERVER['DOCUMENT_ROOT'], should we always assume that the it always should be "/site1/www" without "/" at the end?
So for example the image folder physical path should always be
1) $image_physical_path= $_SERVER['DOCUMENT_ROOT']."/images";
not
2) $image_physical_path= $_SERVER['DOCUMENT_ROOT']."images"; //without that /
Because in case 1, no matter how the site set up their document root "/site1/www/" or "/site1/www", it will turn out to be "/site1/www/images" or "/site1/www//images". Both will work.
But if use case 2)
then it will turn out to be "/site1www/images" or "/site1/www/images". "/site1www/images" will not work.
For the portable reason, we should always use
$image_physical_path= $_SERVER['DOCUMENT_ROOT']."/images"; // with the "/"
Right?