Open window folder using php code

Dharmeshdhabu

New member
I want to open window folder in window and not in browser. I got below code from net but it is not working. Please guide me.
Code:
if (isset($_POST['Report'])) {
			$file_location = 'D:\REPORTS';
			exec("start \"\" \"{$file_location}\"");
	}
 
You can not do that, the security rules do not allow you to do that. You can try to do it on the same machine that you are using for serving the php app, but it won't be easy, you need to disable some security rules and make a few workaround.
Why do you want to do that? Maybe there will be another solution for your problem
 
Michalio said:
You can not do that, the security rules do not allow you to do that. You can try to do it on the same machine that you are using for serving the php app, but it won't be easy, you need to disable some security rules and make a few workaround.
Why do you want to do that? Maybe there will be another solution for your problem

I want a shared folder where patient reports are stored like CT, lab reports etc. so that everyone in network has access to it and can add/view it easily. That is my purpose. If I open folder in browser then every time file needs to be downloaded and after modification needs to be uploaded which taken extra time and effort + occupy space unnecessarily. Please guide me.
 
Then you can read the network dir to list all files and show the list with options to upload, read, download, rename and delete. All changes in files should by done by your php app, not directly by the user
Check this: https://github.com/prasathmani/tinyfilemanager
 
Michalio said:
Then you can read the network dir to list all files and show the list with options to upload, read, download, rename and delete. All changes in files should by done by your php app, not directly by the user
Check this: https://github.com/prasathmani/tinyfilemanager

Well, I want to avoid that kind of stuff. I just want php code to open network shared folder in windows, that all. At present we are using that same folder and updating as required. But one has to search. I wants to make the process automated with php code. Nothing else.
 
Php is running on the server so you cannot do anything on the client side. You can send some javascript and html, but you still cannot open the directory directly from the browser, it is blocked by security reasons. You will need create a plugin for the browser or find another workaround, because you cannot do that in simple way
 
Back
Top