0

In our company we have XAMPP running on our server. XAMPP however is running as a service on our server. Essentially if XAMPP shuts down it restarts automatically running as a service. Now because XAMPP is running as a service the standard php functions which allow you to check to see if a network drive is mapped won't work. The example shown below won't work. In my php scripts I access directories and files via UNC. If XAMPP is not running as a service the example given below will work. It's preferred however to run XAMPP as a service within our company. My question is, is there any way of checking if a network drive is mapped even though XAMPP is running as a service?

Any help much appreciated.

<?php
$mydir = "G:\ ";

echo file_exists($mydir) ? "G is mounted":"G is not mounted";
?>
David Egan
  • 424
  • 2
  • 8
  • 23

1 Answers1

0

Now my understanding of running as a services is incorrect. In the above example XAMPP is running as a service. As such XAMPP should never shut down on the server while running as a service. If XAMPP were to shut down on the server while running as a service this would lead to questions as to why it shut down. Prior to running XAMPP as a service XAMPP had a tendency to shut down it self every couple of weeks and had to be restarted manually. Running XAMMP as a service means it should never shut down.

David Egan
  • 424
  • 2
  • 8
  • 23