[英]Check if network drive is mapped php
Does php allow you to check if a network drive is mapped. php是否允许您检查是否映射了网络驱动器。 Essentially on all computers our G:\\ drive is mapped.
基本上在所有计算机上,我们的G:\\驱动器都已映射。 Is it possible using php script to check if the G:\\ drive is mapped?
是否可以使用php脚本检查G:\\驱动器是否已映射? In order to access directories and files from the mapped drive I use UNC names.
为了从映射的驱动器访问目录和文件,我使用UNC名称。
Help much appreciated 帮助非常感谢
Why should you use php to access to a client path? 为什么要使用php访问客户端路径? file_exists should work as well but i don't understand the point :)
file_exists应该也可以工作,但我不明白要点:)
<?php
$mydir = "G:\ ";
echo file_exists($mydir) ? "G is mounted":"G is not mounted";
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.