1. Download PHP 5 and unzip it somewhere (e.g. C:\php-5.0.0 - you need to create this directory!)2. From a command prompt; C:> cd php-5.0.0 C:\php-5.0.0> regsvr32 php5activescript.dllThat's it. Now the fun begins.Create a (plain HTML) web page like; <html> <head> <title>PHP ActiveScript</title> </head> <body> <script language="ActivePHP5">$document->write('<h1>Output generated by '. phpversion(). ' ['.php_sapi_name().']</h1>');$document->write('<p>Available objects</p>');foreach ( array_keys($GLOBALS) as $global_var ) { if ( is_object($GLOBALS[$global_var]) ) { $document->write($global_var."<br>"); } }</script> </body> </html>View the page in IE and away you go (you should see a list of objects you'd normally use from Javascript).Now all we need is Microsoft to bundle it with IE ;)
messagebox是客户端的
<?php
echo <script language=javascript>alert("aaaaaaa");</script>?>
这个不是Linux开发ui得么?
echo '
<script>alert("错误提示");</script>';
?>
C:> cd php-5.0.0
C:\php-5.0.0> regsvr32 php5activescript.dllThat's it. Now the fun begins.Create a (plain HTML) web page like;
<html>
<head>
<title>PHP ActiveScript</title>
</head>
<body>
<script language="ActivePHP5">$document->write('<h1>Output generated by '. phpversion().
' ['.php_sapi_name().']</h1>');$document->write('<p>Available objects</p>');foreach ( array_keys($GLOBALS) as $global_var ) {
if ( is_object($GLOBALS[$global_var]) ) {
$document->write($global_var."<br>");
}
}</script>
</body>
</html>View the page in IE and away you go (you should see a list of objects you'd normally use from Javascript).Now all we need is Microsoft to bundle it with IE ;)
echo "<script language=javascript>alert('错误提示');</script>";
?>
C:\php>regsvr32 php5activescript.dll成功后,写一个脚本,比如active.html
<html>
<head>
<title>PHP 5 Active Script</title>
</head>
<body>
<script language="ActivePHP5">
$window->alert("Hello World");
</script>
</body>
</html>然后在本机运行,你就看到效果了
我下载的php5里面怎么没有php5activescript.dll这个文件啊
我当初也想试试看的