PDA

View Full Version : Maybe a stupid question.....


N_R_D
01-25-2006, 09:13 PM
Logically I think it should not work, but....

Can I have a PHP file on the internet look to a direct file path on the computer?

so like

\\files\image.jpg

??

Rich Pedley
01-25-2006, 09:16 PM
In the past i came across a lot of people who link to images on their computer when creating a web page. they upload it to a web hosting company and can see the page with all the images. they assume everything is fine.

The problem is, no-one else can see that image because they don't have it on their computer.

I don't see why PHP should be any different.

N_R_D
01-25-2006, 09:21 PM
What I am trying to do is use PHP to write to an XML file, but PHP is not supported here at work.

So if the PHP file is run and is on my server on the net, but points to an XML file on a shared server here at work, and everyone could have access to it, then do you think it would work?

kiswa
01-25-2006, 10:39 PM
You could do something like that if your shared network was not very secure and allowed connections to be made to it from PHP scripts.

Then you could have your PHP script open the file, but it would have to be done through an accepted protocol (HTTP, FTP, etc.).

However, if the only people who are going to access the file will be doing so from a location that has say Drive Z:\ then I suppose you could have the script open file:///Z:/path/to/the/file.ext and it might actually work.

It'd be odd though.

N_R_D
01-25-2006, 10:44 PM
Yeah kind of odd ... and it didnt work ... I tried like three different ways. no good.

Oh well, guess their just out of luck.