lifeasalounge Posted August 11, 2008 Share Posted August 11, 2008 Hi all, I have a local Intranet setup and i want to be able to access directories and files using php. At the moment i can't figure out how to do it. I have read a lot of articles and have only gathered that i have to change the log on account of the apache windows service. Does anyone know how i would go about doing this? Any tutorials that might be useful? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/ Share on other sites More sharing options...
corbin Posted August 11, 2008 Share Posted August 11, 2008 Windows, Linux, Mac? What OS? Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-614112 Share on other sites More sharing options...
lifeasalounge Posted August 12, 2008 Author Share Posted August 12, 2008 OS: win xp home Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-614147 Share on other sites More sharing options...
corbin Posted August 12, 2008 Share Posted August 12, 2008 I would map the drive, and then access it like you normally would access a file on a drive in PHP. Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-614284 Share on other sites More sharing options...
lifeasalounge Posted August 12, 2008 Author Share Posted August 12, 2008 Can you give me an example of this? Or point me towards a tutorial? I've been trying to use glob() but have had not luck. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-614508 Share on other sites More sharing options...
corbin Posted August 13, 2008 Share Posted August 13, 2008 Google how to map a network drive in Windows, and then just use normal file functions on the files... Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-615272 Share on other sites More sharing options...
AjBaz100 Posted August 21, 2008 Share Posted August 21, 2008 Could try this.. $dir = "/tmp"; if($dh = opendir($dir)) { while(($file = readdir($dh)) !== false) { if($file != "." && $file != "..") { echo $file; } } closedir($dh); } Quote Link to comment https://forums.phpfreaks.com/topic/119223-accessing-network-files-and-directories-with-php/#findComment-621689 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.