Sample code for 30+ languages & platforms
PHP ActiveX

Get the Target of a Symbolic Link

See more FileAccess Examples

Demonstrates how to get the target of a symbolic link.

Note: This example requires Chilkat v9.5.0.77 or greater.

Chilkat PHP ActiveX Downloads

PHP ActiveX
<?php

$fac = new COM("Chilkat.FileAccess");

$targetPath = $fac->symlinkTarget('qa_data/my_symlink');
if ($fac->LastMethodSuccess != 1) {
    print 'Failed to get symlink target.' . "\n";
    exit;
}

print 'target path = ' . $targetPath . "\n";

?>