Hi...

I have a problem to load a PDF file which is stored on another machine.I had loaded the PDF on the same machine using following PHP script.Here I had used a hyper link to load PDF.

<?php 
$file="first";
$pdfFile=$file.".pdf#page=1";
?>
<a href="<?php echo $pdfFile; ?>"  target="_blank" >  Click to view PDF</a>

This is working properly.But I had tried to access the PDF which is on another machine using IP address as follows

<?php 
$file="//192.x.x.x/e:/pdf/first";
$pdfFile=$file.".pdf#page=1";
?>

This script is not working...:(

Any body have any idea please help me.It is very urgent for my project.

Try breaking the problem down into little pieces.

First type out the HTML by hand and make sure that the link is working. It's possible that your URL in the link is not exactly correct.

If you know the right URL, then it's possible you're not building the right URL with your PHP. In that case, print out your PHP variable and compare it to the correct URL.

Hope that helps!

I had tried using HTML as follows
<a href="192.x.x.x/d:/pdf/first.pdf" target="_blank" > Click to view PDF</a>
but it is not working..
What should I give IP address or computer name?

Are you trying to access a shared drive on a local network?

Yes I tried it with a shared drive.How should I give the path?

My problem is solved.I accessed it by installing a server.Using the the IP address.
Thank u for your support

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.