如何在pws下使用php?????急!急!!急!!!(100分)

  • 主题发起人 主题发起人 wangbing
  • 开始时间 开始时间
W

wangbing

Unregistered / Unconfirmed
GUEST, unregistred user!
如何在windows下使用php?
请尽快回复在这,或写信至bear54@263.net
我现在都快愁死了,我有一php编译软件但不知如何设置host,我的机子装了PWS但不知
如何在它下面使用php.
请众位大虾指点一、二,我愿奉送100分
谢谢!!!
 
IIS 和 MS-PWS
你可以简单的将php.exe这个文件放到你的程序目录下,然后使用如http://my.server/scripts/php.exe/page.php
的形式来运行程序。
你要采用型如:http://my.server/page.php的方式来运行,就不得不编辑注册表了。
注意:在编辑注册表前先做一个背份。如果你的注册表被破坏PHP Development Team不承担任何
责任。如果你破坏了注册表,你将不得不重装系统,否则无法启动计算机!
你可通过运行regedit.exe来编辑注册表。步骤是,在开始菜单选运行然后键入 regedit,按OK按钮。你需要
编辑的注册表设置是:
HKEY_LOCAL_MACHINE:System:CurrentControlSet:Services:W3Svc:Parameters:ScriptMap。增加一个新名
称,这就是你的PHP3 script程序所要使用的扩展名,在数据栏填PHP3解析器的路径。
如:.phtm3 "c:/webshare/scripts/php.exe"
(译者注:.phtm3 是script程序要使用的扩展名,"c:/webshare/scripts/php.exe" 当然是php.exe的绝对路径
了)
若使用ISAPI版的PHP,此设置类似: .phtm "c:/webshare/scripts/php3_isapi.dll"
你可能需要让很多目录有执行php的script程序的能力。这可以通过IIS的管理来做,查阅IIS文档以获得更多
信息。
 
Extract the distribution file to a directory of your choice. "C:/PHP3/" is a good start.
Copy the file, 'php3-dist.ini' to your '%WINDOWS%' directory and rename it to 'php3.ini'. Your '%WINDOWS%' directory is typically:

c:/windows for Windows 95/98
c:/winnt or c:/winnt40 for NT servers

Edit your 'php3.ini' file:

You will need to change the 'extension_dir' setting to point to your php-install-dir, or where you have placed your 'php3_*.dll' files. ex: c:/php3
If you are using Omni Httpd,do
not follow the next step. Set the 'doc_root' to point to your webserversdo
cument_root. ex: c:/apache/htdocs or c:/webroot
Choose which modules you would like to load when PHP starts. You can uncomment the: 'extension=php3_*.dll' lines to load these modules. Some modules require you to have additional libraries installed on your system for the module to work correctly. The PHP FAQ has more information on where to get supporting libraries. You can also load a module dynamically in your script using: dl("php_*.dll");

On PWS and IIS, you can set the browscap.ini to point to: 'c:/windows/system/inetsrv/browscap.ini' on Windows 95/98 und 'c:/winnt/system32/inetsrv/browscap.ini' on NT Server. Additional information on using the browscap functionality in PHP can be found at this mirror, select the "source" button to see it in action.

Windows 95/98/NT and PWS/IIS 3
The recommended method for configuring these servers is to use the INF file included with the distribution (php_iis_reg.inf). You may want to edit this file and make sure the extensions and PHP install directories match your configuration. Or you can follow the steps below todo
it manually.
WARNING: These steps involve working directly with the windows registry. One error here can leave your system in an unstable state. We highly recommend that you back up your registry first. The PHP Development team will not be held responsible if you damage your registry.

Run Regedit.
Navigate to: HKEY_LOCAL_MACHINE /System /CurrentControlSet /Services /W3Svc /Parameters /ScriptMap.
On the edit menu select: New->String Value.
Type in the extension you wish to use for your php scripts. ex: .php3
Double click on the new string value and enter the path to php.exe in the value data field. ex: c:/php3/php.exe %s %s. The '%s %s' is VERY important, PHP will not work properly without it.
Repeat these steps for each extension you wish to associate with PHP scripts.
Now navigate to: HKEY_CLASSES_ROOT
On the edit menu select: New->Key.
Name the key to the extension you setup in the previous section. ex: .php3
Highlight the new key and in the right side pane,do
uble click the "default value" and enter phpfile.
Repeat the last step for each extension you set up in the previous section.
Now create another New->Key under HKEY_CLASSES_ROOT and name it phpfile.
Highlight the new key phpfile and in the right side pane,do
uble click the "default value" and enter PHP Script.
Right click on the phpfile key and select New->Key, name it Shell.
Right click on the Shell key and select New->Key, name it open.
Right click on the open key and select New->Key, name it command.
Highlight the new key command and in the right side pane,do
uble click the "default value" and enter the path to php.exe. ex: c:/php3/php.exe -q %1. (don't forget the %1).
Exit Regedit.
 
现有一问题是那个php.exe我没有,我有一个叫PHP editor的软件是由ergin soysal
制作的,在国内的网站中哪有php.exe???请你们告诉我好吗?否则我实在不知接受
谁的答案。
 
wo kao! 没有你装的什么php! 下载一个先.
www.php.net
 
不好意思,让大家见笑了,我以为那个软件就可以处理PHP结果却不行
只好再厚着脸皮再问一下国内有下载的吗?另先奉送50以谢大家指点.
 
www.pchome.net上面好像有下载
 
我已下载了一个,不过是php4 beta2版,不知设置是否相同?
 
php4 beta2带的模块太少,最好是php3
设置方法基本一样.
 
多人接受答案了。
 
后退
顶部