You are here: Re: php function to call vbs « PHP Programming Language « IT news, forums, messages
Re: php function to call vbs

Posted by lorento on 05/31/06 08:35

drec wrote:
> I am just getting my feet wet in php. Is there any way to execute a
> vbscript file through using a php command? Or in other words, have a
> php script call a vbs file.


You can use COM class. It allows you to instantiate an OLE compatible
COM object and call its methods and access its properties.

<?php
$VBScript = new COM("MSScriptControl.ScriptControl");
$VBScript->Language = "VBScript";

$VBCode = ""; //your vbscript here

$VBScript->AddCode($VBCode);

$input = $VBScript->Eval("getInput()");

$Shell = new COM("WScript.Shell");

//run
$Shell->Popup($input, '', '', '');

?>

regards,

Lorento
--
http://www.mastervb.net
http://www.padbuilder.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация