Page 1 of 1

Calling a VB script file from a php file?

Posted: Mon Jul 25, 2005 2:47 pm
by hg363
I have my PHP file and a VBSCRIPT file on the same SERVER and within the same FOLDER.

How then from within my php file can I call the vbscript file so that the vbscript file will execute.

Can any one please advise me by providing me with a simple example please.

h.ghelani@rbht.nhs.uk

Posted: Mon Jul 25, 2005 3:47 pm
by timvw
With the following i see a wscript.exe instance appear in my process list... But it doesn't end.. (Quit function in test.vbs doesn't seem to work)

Code: Select all

$result = `wscript test.vbs`;

Posted: Mon Jul 25, 2005 4:30 pm
by hg363
Hello, thanks for getting back to me so early.

As a mere test I tried as you suggested and just used the following in my vbscript file to test

msgbox ">>>"

however when I ran the php file, the code you suggested was echoed within the browser

but the >>> did not appear, however an instance of wscript.exe was created within the processes

thanks, I will keep on searching