Re: fopen() on a network share?

From: Date: Mon, 15 Jun 2009 23:24:48 +0000
Subject: Re: fopen() on a network share?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-294058@lists.php.net to get a copy of this message
Brian Dunning wrote: > Extra info, in case needed: my code says > > fopen('\\servername\sharename\folder\file.xml', 'w'); > > and it returns "Failed to open stream, no such file or directory". I've > verified that the PHP machine does have unrestricted permissions to that > share and to the directory. Thanks. > > > On Jun 15, 2009, at 1:39 PM, Brian Dunning wrote: > >> Running on Windows... I have a network share, \\sharename\foldername, >> and I want to write a file. How do I format the pathname with fopen() >> for this? > > > As I remember, you either have to double slash or use the other slash. \\\\servername\\sharename\\folder\\file.xml or //servername/sharename/folder/file.xml -- Thanks! -Shawn http://www.spidean.com

« previous php.general (#294058) next »