2014-03-25 51 views

回答

4

沒有,遺憾的是沒有辦法,包括關閉PHP框架到VBScript的環境的子命令。即使Visual Studio可以訪問本機上的所有引用和COM對象,也無法訪問PHP庫。

但是,Visual Studio可以使用PHP工具,該工具可以在Visual Studio中使用擴展。我很抱歉,這是在其他編碼環境中包含PHP的能力。 - >Here

如果您只是試圖將批處理文件轉換爲從vbscript運行(即使它似乎您已經研究過這一點),請在下面查看。

您可以使用Wscript.wshshell.run命令來實現此目的,該命令可以運行幾乎任何批處理文件命令,只要它們位於正確的目錄中即可。

「提供對本機Windows shell的訪問。」 〜Microsoft

例如

dim WshShell 
Set WshShell = WScript.CreateObject("WScript.Shell") 
WshShell.Run "php C:\php\after.php" 
0
Const VbNormalFocus = 1 
Const bWaitOnReturn = True 

Dim wshShell 
Set wshShell = CreateObject("WScript.Shell") 

wshShell.Run "php " & "C:\php\after.php", VbNormalFocus, bWaitOnReturn 

Set wshShell = Nothing 

有關詳細信息:Run Method (Windows Script Host)

相關問題