note 117322 added to function.opendir

From: Date: Thu, 21 May 2015 16:22:00 +0000
Subject: note 117322 added to function.opendir
Groups: php.notes 
Request: Send a blank email to php-notes+get-202631@lists.php.net to get a copy of this message
About // Define the parameters for the shell command $location = "\\servername\sharename"; $user = "USERNAME"; $pass = "PASSWORD"; $letter = "Z"; // Map the drive system("net use ".$letter.": \"".$location."\" ".$pass." /user:".$user." /persistent:no>nul 2>&1"); // Open the directory $dir = opendir($letter.":/an/example/path") With apache in windows this is not working is needed to double all backslashes to work. $location = "\\\\servername\\sharename"; $user = "USERNAME"; $pass = "PASSWORD"; $letter = "Z"; // Map the drive system("net use ".$letter.": ".$location." ".$pass." /user:".$user." /persistent:no>nul 2>&1"); $dir = $letter.":/"; $dh = opendir($dir); This worked for me. ---- Server IP: 72.52.91.14 Probable Submitter: 181.167.1.227 ---- Manual Page -- http://php.net/manual/en/function.opendir.php Edit -- https://master.php.net/note/edit/117322 Del: integrated -- https://master.php.net/note/delete/117322/integrated Del: useless -- https://master.php.net/note/delete/117322/useless Del: bad code -- https://master.php.net/note/delete/117322/bad+code Del: spam -- https://master.php.net/note/delete/117322/spam Del: non-english -- https://master.php.net/note/delete/117322/non-english Del: in docs -- https://master.php.net/note/delete/117322/in+docs Del: other reasons-- https://master.php.net/note/delete/117322 Reject -- https://master.php.net/note/reject/117322 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202631) next »