I'm totally new about PHP. My machine is server 2003 and PHP 5.0 was installed. However, when I tried to open a .php file in window Explorer, I was prompted as do you want open, save .. the file. If I choose open file, nothing happened.
It seems the machine doesn't recognize the .php at all. What configuration I should do now ?
Can't open Php file
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Can't open Php file
You need to install a web server with PHP and then browse to your file in IE or another browser using http://localhost/path/to/my/file.php. You can download a WAMP (Windows, Apache, MySQL, PHP) stack and install it easily.
Other than that you can run the PHP from the CLI. Start > Run > cmd
C:\> \path\to\php.exe \path\to\my\file.php
Other than that you can run the PHP from the CLI. Start > Run > cmd
C:\> \path\to\php.exe \path\to\my\file.php
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: Can't open Php file
Thank you for reply. The machine has IIS installed. The php choose IIS CGI as web server. Is there any other thing needs installed?
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Can't open Php file
I'm not really sure about IIS. The PHP installer should do it correctly and tell you if you need to do more.ying06 wrote:Thank you for reply. The machine has IIS installed. The php choose IIS CGI as web server. Is there any other thing needs installed?
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.