Symlinks mit PHP erzeugen: Unterschied zwischen den Versionen
Aus Wikizone
(Die Seite wurde neu angelegt: „<syntaxhighlight lang="php"> $t3version = '4.5.40'; //typo3_src $linktarget = '../typo3_src-'.$t3version; $linkname = 'typo3_src'; echo("<br />Create Sy…“) |
|||
| (2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| + | Beispiel Symlinks für TYPO3 anlegen | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
| − | + | ||
| − | + | $t3version = '7.6.23'; // Edit to correct version | |
| − | + | $t3path = '../'; // Edit to correct source location (include / at the end) | |
| − | + | ||
| − | + | //typo3_src -> typo3_src-x.x.x | |
| − | + | $linktarget = $t3path.'typo3_src-'.$t3version;// Assumes source is above webroot | |
| + | $linkname = 'typo3_src'; | ||
| + | echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />'); | ||
| + | symlink($linktarget,$linkname); | ||
| + | echo(readlink($linkname)); | ||
| + | |||
| + | //typo3 -> typo3_src/typo3 | ||
| + | $linktarget = 'typo3_src/typo3'; | ||
| + | $linkname = 'typo3'; | ||
| + | echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />'); | ||
| + | symlink($linktarget,$linkname); | ||
| + | echo(readlink($linkname)); | ||
| + | |||
| + | //index.php -> typo3_src/index.php | ||
| + | $linktarget = 'typo3_src/index.php'; | ||
| + | $linkname = 'index.php'; | ||
| + | echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />'); | ||
| + | symlink($linktarget,$linkname); | ||
| + | echo(readlink($linkname)); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Aktuelle Version vom 10. Oktober 2017, 09:53 Uhr
Beispiel Symlinks für TYPO3 anlegen
$t3version = '7.6.23'; // Edit to correct version
$t3path = '../'; // Edit to correct source location (include / at the end)
//typo3_src -> typo3_src-x.x.x
$linktarget = $t3path.'typo3_src-'.$t3version;// Assumes source is above webroot
$linkname = 'typo3_src';
echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />');
symlink($linktarget,$linkname);
echo(readlink($linkname));
//typo3 -> typo3_src/typo3
$linktarget = 'typo3_src/typo3';
$linkname = 'typo3';
echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />');
symlink($linktarget,$linkname);
echo(readlink($linkname));
//index.php -> typo3_src/index.php
$linktarget = 'typo3_src/index.php';
$linkname = 'index.php';
echo("<br />Create Symlink: ".$linkname.' -> '.$linktarget.'<br />');
symlink($linktarget,$linkname);
echo(readlink($linkname));