|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Batch File from Server
Hi all,
I am working on PHP with MySQL on a Windows Terminal. I am right now stuck in using batch files in PHP (with Javascript). Let me explain my situation as clear as possible of me. I have a set of batch files in my htdocs/bat folder on the server. When the user clicks on a button in the page I desire to execute a batch file present in the server. This batch file should create a directory (the name of which I pass to the batch file) on the clients machine. For example: Assume that there is a batch file called abc.bat which contains the code: PHP Code:
If I call the batch file as PHP Code:
A directory should be created on the clients machine C: drive as John. In total: The batch file present in the server should be fetched and all its contents (batch file's commands) should be executed completely in the client side. How do I do it ? Please help me with the code. Its urgent. Thanx for any help in advance. Regards, tvks I strongly believe PHP never has "no" as an answer Last edited by tvks : October 11th, 2007 at 07:54 AM. |
|
#2
|
||||
|
||||
|
As far as I am aware this is impossible as it would be totally insecure as if you could run it from a button click it could be run automatically, which would be a sort of paradise for virus makers etc. You could just have the user download the file and then tell them to run it.
I personally do not see a way PHP could do it, perhaps something like Java could but Ive never really used Java.
__________________
Ubuntu User #13389 |
|
#3
|
|||
|
|||
|
No matter what they msut download/run it on their own. You can, however, make PHP edit the batch file so that the batch file has the folder set
__________________
-gmt2001 |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Batch File from Server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|