PHP Doku:: ActiveScript - install.windows.activescript.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchInstallation und KonfigurationInstallation on Windows systemsActiveScript

Ein Service von Reinhard Neidl - Webprogrammierung.

Installation on Windows systems

<<Manual Installation Steps

Microsoft IIS>>

ActiveScript

This section contains notes specific to the ActiveScript installation.

ActiveScript is a Windows only SAPI that enables you to use PHP script in any ActiveScript compliant host, like Windows Script Host, ASP/ASP.NET, Windows Script Components or Microsoft Scriptlet control.

As of PHP 5.0.1, ActiveScript has been moved to the » PECL repository. Eine DLL-Datei für diese PECL-Erweiterung steht derzeit nicht zur Verfügung. Weitere Details finden Sie im Abschnitt zum Kompilieren für Windows.

Hinweis:

You should read the manual installation steps first!

After installing PHP, you should download the ActiveScript DLL (php5activescript.dll) and place it in the main PHP folder (e.g. C:\php).

After having all the files needed, you must register the DLL on your system. To achieve this, open a Command Prompt window (located in the Start Menu). Then go to your PHP directory by typing something like cd C:\php. To register the DLL just type regsvr32 php5activescript.dll.

To test if ActiveScript is working, create a new file, named test.wsf (the extension is very important) and type:

<job id="test">
 
 <script language="PHPScript">
  $WScript->Echo("Hello World!");
 </script>
 
</job>
Save and double-click on the file. If you receive a little window saying "Hello World!" you're done.

Hinweis:

In PHP 4, the engine was named 'ActivePHP', so if you are using PHP 4, you should replace 'PHPScript' with 'ActivePHP' in the above example.

Hinweis:

ActiveScript doesn't use the default php.ini file. Instead, it will look only in the same directory as the .exe that caused it to load. You should create php-activescript.ini and place it in that folder, if you wish to load extensions, etc.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
maflorez at cognox dot com
15.10.2006 19: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.05.2005 18: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 !");



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)