- file_get_contents: documentation ( source)
- str_ireplace: documentation ( source)
<?php
function getAnvaWordFile($path)
{
$prefix = 'N:\ANVAPROD\DATA\DATA1\ANVAWORD';
$filename = str_ireplace(array($prefix, '\\'), array('/mount/anvaword', '/'), $path);
return file_get_contents($filename);
}
getAnvaWordFile('/etc/passwd');