Created
December 5, 2019 06:33
-
-
Save dnikonov/8f24a91260e3130032053e8863ae7600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// echo "<pre>"; | |
// print_r($_SERVER); | |
// echo "</pre>"; | |
// exit; | |
error_reporting(E_ALL); | |
$links = array("bitrix", "local", "upload"); | |
foreach ($links as $key => $value) { | |
$target = str_replace("subdomen.domen.ru", "domen.ru", $_SERVER["DOCUMENT_ROOT"])."/".$value; | |
echo $target; | |
echo "<br>"; | |
if (is_link($value) && is_file($value)) { | |
} else { | |
exec("cd ".$_SERVER["DOCUMENT_ROOT"]."; ln -s ".$target." ".$value); | |
} | |
echo readlink($value); | |
echo "<br>"; | |
echo "<br>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment