Calling a VB script file from a php file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hg363
Forum Newbie
Posts: 2
Joined: Mon Jul 25, 2005 2:34 pm

Calling a VB script file from a php file?

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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`;
hg363
Forum Newbie
Posts: 2
Joined: Mon Jul 25, 2005 2:34 pm

Post 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
Post Reply