faqts : Computers : Programming : Languages : PHP : Common Problems : Files

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 27 people (37%) answered Yes
Recently 0 of 10 people (0%) answered Yes

Entry

How can I access a file on a remote machine in a WinNT network? "\\machine\file" won't work...

Sep 11th, 2000 04:55
Guillaume Erbs, Techek, Ben Udall,


When you type the character \ you are actually escaping the char 
following it. That means that you'd type this :
<?php
echo "this is a \" character";
?>
To have this written :
this is a \ character
if you do *NOT* escape the second " char you'd get an error.
To answer your question - escape all required chars! That's :
$handle = fopen("\\\\machine\\file",$mode);
I hope it works (I haven't tried it myself!)
Guillaume:
I'm sorry my question didn't mention this, but I was escaping the \ 
characters when trying to access the remote machine, and it doesn't 
work :(