Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9249645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:14:53+00:00 2026-06-18T10:14:53+00:00

I have PDF documents stored in a shared folder in a server where I

  • 0

I have PDF documents stored in a shared folder in a server where I need to access them from a web application through file browsing. I know the names of the files stored there. So my link would be like (file:\\server\folder\abc.pdf).

My php application is in a web server running on xampp. But the shared folder is in a different domain. (Not in the web server folder – Normal file folder). When I try to access a file it says “Cannot find file:\\server\folder\abc.pdf. Make sure the path or Internet address is correct“.

<a href="file:\\server\folder\abc.pdf" >Load File</a> 

<?php 
echo $dir = '\\\\server\\folder\\'; 

$dh = opendir($dir); 

while (($file = readdir($dh)) !== false) { 
echo "<a href=".$dir.$file.">".$file."<br></a>"; 
} 

closedir($dh); 

?>

When I type “\\server\folder” on the address bar it prompts for the username and password of that folder since it is in the different domain (My current domain is already authenticated on my sign on). When I provide windows authentication to that folder, my web application url will work and opens up the file successfully.

I want to achieve this task without prompting the directory security username and password. My web application will be used by many users so locally mapping of network drive will also not feasible.

Can anyone help me on this please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:14:55+00:00Added an answer on June 18, 2026 at 10:14 am

    Got the Answer

    We can map the network drive to the server and save the username and password which is prompted in the “map network drive” wizard and then can use mapped network wizard normally.

    Below is the code that worked for me.

    $dir = "A:/folder/";
    $dh = opendir($dir);
    while (($file = readdir($dh)) !== false)
    {
     echo 'The file is : ' . $file . "\n";
    }
    closedir($dh);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an intranet web application where I need to sign PDF documents which
I have saved a pdf file in the apps documents folder on the iPad.
I have documents (images, Word documents, PDF's, etc) stored in an SQL Server database
I have a application which stores documents on the file system (PDF, WORD etc)..
I have an encrypted word/excel/pdf file locally stored which I need to preview in
I have some pdf documents and I need to find a way to automate
I have a web application that uses a couple of PDF forms to create
I have a CMS database (SQL Server) that stores around 2 million documents PDF,
We have a need to convert MS Office documents to PDF real time when
I have a table that stores file paths of images.documents,pdf etc... My query is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.