Is there a way to navigate to a file on a local location which uses a double backslash at the start like this: \192.168.1.1\folder\file.xml ?
I have tried several ways like this:
file_get_contents("\\192.168.1.1\folder\file.xml");
fopen("\\192.168.1.1\folder\file.xml", '');
But it keeps failing to open the file. while navigating to it locally seems to work.
you need a backslash to escape every backslash (a backslash is the escape char in coding)
So you would have:
$addr = "\\\\192.168.1.1\\folder\\file.xml";
@Craig B - Beat me to the answer by few seconds, you should use double double
"\\\\192.168.1.1\\folder\\file.xml"