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

search for in the

Microsoft IIS> <Manual de Instalación
Last updated: Fri, 20 May 2011

view this page in

ActiveScript

Esta sección contiene notas específicas de la instalación ActiveScript.

ActiveScript es sólo para Windows una SAPI que le permite el uso de script PHP en cualquier host ActiveScript compatible, como Windows Script Host, ASP/ASP.NET, Windows Script Components o Control Scriptlet.

A partir de PHP 5.0.1, ActiveScript se ha trasladado a el repositorio » PECL. No hay una DLL disponible para esta extensión PECL actualmente. Vea también la sección Compilando en Windows.

Note:

Usted debe leer primero el Manual de instalación paso a paso

Después de instalar PHP, debe descargar el ActiveScript DLL (php5activescript.dll) y colocarlo en el directorio principal de PHP (e.g. C:\php).

Después de tener todos los ficheros necesarios, debe registrar el DLL en el sistema. Para ello, abra una ventana del símbolo del sistema (que se encuentra en el del menú inicio). A continuación, vaya al directorio de PHP escribiendo algo así como cd C:\php. Para registrar el DLL simplemente escriba regsvr32 php5activescript.dll.

Para probar si el ActiveScript está trabajando, se crea un nuevo fichero, llamado test.wsf (La extensión es muy importante) y escriba:

<job id="test">
 
 <script language="PHPScript">
  $WScript->Echo("Hola Mundo!");
 </script>
 
</job>
Guarde y haga doble clic en el fichero. Si usted recibe una pequeña ventana diciendo "Hola Mundo!" ha terminado.

Note:

En PHP 4, el motor fue nombrado "ActivePHP', así que si está usando PHP 4, se debe reemplazar 'PHPScript' por 'ActivePHP' en el ejemplo anterior.

Note:

ActiveScript no utiliza el fichero predeterminado php.ini . En su lugar, se verá sólo en el mismo directorio que el .exe que causaba la carga. Se debe crear php-activescript.ini y colocarlo en esa carpeta, si desea cargar las extensiones, etc



add a note add a note User Contributed Notes ActiveScript
maflorez at cognox dot com 15-Oct-2006 05: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 04: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 !");

 
show source | credits | stats | sitemap | contact | advertising | mirror sites