PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Microsoft IIS / PWS> <マニュアルインストール
Last updated: Fri, 10 Oct 2008

view this page in

ActiveScript

このセクションでは、ActiveScript で PHP を使用する場合について説明します。

ActiveScript は Windows 独自の SAPI で、PHP スクリプトが Windows Script Host, ASP/ASP.NET, Windows Script Components や Microsoft Scriptlet control といった ActiveScript 互換ホストで実行可能になります。

PHP 5.0.1 の時点で、ActiveScript サポートは » PECL リポジトリに移動されました。 この PECL 拡張モジュール用の DLL は、» PHP のダウンロード ページあるいは » http://pecl4win.php.net/ からダウンロードできます。

注意: まず始めに、マニュアルインストールの手順 をお読みください。

PHP をインストールした後、ActiveScript 用の DLL (php5activescript.dll) をダウンロードし、メイン PHP フォルダ (C:\php 等) へ置いてください。

ファイルを設置できたら、システムに DLL を登録します。 (スタートメニューから)コマンドプロンプトを開き、 PHP のフォルダへ移動し(cd C:\php 等とする)、 regsvr32 php5activescript.dll と打ち込むと DLL を登録できます。

ActiveScript が動作しているかテストするには、test.wsf という名前(拡張子名が重要)で新しいファイルを作成し、 以下のようにタイプしてください。

<job xml:id="test">
 
 <script language="PHPScript">
  $WScript->Echo("Hello World!");
 </script>
 
</job>
保存した後、ファイルをダブルクリックして、ウインドウに 「Hello World!」 と表示されたら、上手く動作しています。

注意: PHP 4では、エンジンは「ActivePHP」と命名されました。 したがって、PHP 4を使用している場合、「PHPScript」を上記の例における 「ActivePHP」に取り替えるべきです。

注意: ActiveScript では、デフォルトの php.ini ファイルは使われません。 代わって、ロードする .exe ファイルと同じフォルダが探されます。 拡張モジュールを読み込みたい場合は、 php-activescript.ini ファイルを作成し、当該フォルダに 設置すると良いでしょう。



add a note add a note User Contributed Notes
ActiveScript
maflorez at cognox dot com
15-Oct-2006 11:43
Other option is this:
Copy this text, save with extension .reg and execute.

***** Begin of file don't include
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.phs]
@="PHPScript"

[HKEY_CLASSES_ROOT\PHPScript]
@="PHPScript"
"EditFlags"=dword:00000000
"AlwaysShowExt"=""
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\PHPScript\shell]
@="Run"

[HKEY_CLASSES_ROOT\PHPScript\shell\Run]

[HKEY_CLASSES_ROOT\PHPScript\shell\Run\command]
@="wscript.exe //E:PHPScript \"%1\" \"%2\""

[HKEY_CLASSES_ROOT\PHPScript\shell\Run\ddeexec]

[HKEY_CLASSES_ROOT\PHPScript\shell\Run\ddeexec\Application]
@="wscript"

[HKEY_CLASSES_ROOT\PHPScript\shell\Run\ddeexec\Topic]
@="System"
***** End of file don't include
garfiel_fr at tiscali dot fr
11-May-2005 10:06
There is another way to execute a PHP ActiveScript:

1/ In explorer, open menu "Tools/Folder Options"
2/ Go to tab "File Type"
3/ Click on "New" button and enter a file extension ( PHS for my sample ), you can also select "PHPScript" in "Advanced" button. Then OK, a new file extension is registered.
4/ In tab "File Type" select the new extension and click on button "Advanced". A new dialog box is open.
5/ Click on "New" button and fill edit box with:
  Action: Run
  Application to use: C:\WIN2K\system32\wscript.exe //E:PHPScript "%1" "%2"

That's all !!

Now, your code don't need XML tag at the begining. Hello work in test.phs will be:

$WScript->Echo("Bonjour le monde !");

Microsoft IIS / PWS> <マニュアルインストール
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites