Answer the question
In order to leave comments, you need to log in
How to read files from a network folder using php?
Hello! I am implementing a program for reading audio files from a folder to a user's page.
The problem is that this folder is located on a remote computer on the same network as the server.
If you put the files locally, in the folder with the code, then everything reads fine, if remotely, this is what happens:
$directory = scandir('file://10.26.1.183//Records');
var_dump($directory);
Warning: scandir(): remote host file access not supported, file://10.26.1.183//Records in /usr/local/www/apache24/data/clinicdoctor/controller/controller.php on line 191
Warning: scandir(file://10.26.1.183//Records): failed to open dir: no suitable wrapper could be found in /usr/local/www/apache24/data/clinicdoctor/controller/controller.php on line 191
Warning: scandir(): (errno 36): Operation now in progress in /usr/local/www/apache24/data/clinicdoctor/controller/controller.php on line 191
bool(false)
$directory = scandir(records); // монтированная сетевая папка с аудио файлами
var_dump($directory);
array(2) { [0]=> string(1) "." [1]=> string(2) ".." }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question