Displaying Word file stored on Remote Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mits
Forum Newbie
Posts: 1
Joined: Thu Sep 03, 2009 5:03 am

Displaying Word file stored on Remote Server

Post 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
sousousou
Forum Commoner
Posts: 29
Joined: Fri Aug 28, 2009 1:10 pm

Re: Displaying Word file stored on Remote Server

Post 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
stratbeans
Forum Newbie
Posts: 12
Joined: Sat Aug 29, 2009 2:23 am

Re: Displaying Word file stored on Remote Server

Post 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.
Post Reply