RE: [PHP] fopen() on a network share?

[email protected] (jenai tomaka)
Newsgroups php.general
Message-ID <[email protected]>
Hi, wht dont you try it with IP, ex: fopen('http://11.12.13.14/sharename/folder/file.xml', 'w');

> Date: Mon, 15 Jun 2009 22:51:09 -0400
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [PHP] fopen() on a network share?
> 
> On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzie<[email protected]> wrote:
> > 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
> >
> 
> I think '\\\\servername\sharename\folder\file.xml' will work if you're
> using single quotes around the string. The only slashes that would
> need escaped are the first two since the first slash in '\\' escapes
> the second.
> 
> Andrew
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

_________________________________________________________________
Conheça os novos produtos Windows Live! Clique aqui.
http://www.windowslive.com.br
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.