0 && count($link) > 0 && reset($target) == reset($link)) { $cwd[] = array_shift($target); array_shift($link); } // Compute the required relative path if (count($link) > 1) $target = array_merge(array_fill(0, count($link) - 1, '..'), $target); $link = array_merge($cwd, $link); } return symlink(implode('/', $target), implode('/', $link)); } ////////////////////////////////////////////////////////////////////////////// // PHP4 COMPATIBILITY if (!function_exists('file_put_contents')) { function file_put_contents($filename, $data) { if ($fp = fopen($filename, 'wb')) { fwrite($fp, $data); fclose($fp); return filesize($filename); } return FALSE; } } //////////////////////////////////////////////////////////////////////////////