Page 1 of 1

Displaying Word file stored on Remote Server

Posted: Thu Sep 03, 2009 5:13 am
by Mits
Hi
I am a newbie to PHP so bear with me if my question sounds very naive.
Here is the situation.

From my website i need to show word files that are physically stored on different server. The path to the file and filename are stored in database in following format.

\\ServerName\SharedFolder\2009\AnotherFolder\Filetoshow.doc . SharedFolder is a share and I can access that when I try to access through windows explorer but I am not able to do it through php.

I have seen people suggesting $fh = fopen('http://www.example.com/robots.txt','r') to access a file on remote server, but mine is just stored in a folder.

Any pointers or help would be highly appreciated.

thanks

Mits

Re: Displaying Word file stored on Remote Server

Posted: Fri Sep 04, 2009 12:26 pm
by sousousou
If the file is stored on a computer within the network \\ServerName\SharedFolder\2009\AnotherFolder\Filetoshow.doc might work, but over the internet you need a weburl.

Try reading this: http://stackoverflow.com/questions/1153 ... er-windows

Re: Displaying Word file stored on Remote Server

Posted: Sat Sep 05, 2009 2:55 am
by stratbeans
May be you can use this if you are using apache server then
$fh = fopen('ftp://townsville//var/school/bubbles.doc','r');
otherwise
$fh = fopen('ftp://townsville/var/school/bubbles.doc','r');

Note: It is working on ftp server.