Question:
How do I know PHP has been installed on my PC or not?
Wao Wao
2009-09-06 18:47:52 UTC
How do I know PHP has been installed on my PC or not?
Three answers:
edspegeddd
2009-09-06 18:56:31 UTC
just make a php file.. name it whatever you want.. and include some php code in it. if the file runs the code the way it should.. then your php is installed. here is something you could put in a phptest.php file:




phpinfo();

?>



put the file to where your root directory for web files go of course.. then run it through a browser. if your php is installed right, you'll know it by what you see.
Lee
2009-09-07 01:55:16 UTC
If you have to ask, then definitely not.



If it's a PC with the default installation of the OS, then probably not.



Here's some suggestions, do not ever install PHP standalone and expect your machine to miraculously turn into a webdevelopment sandbox. Either download Cygwin and compile a php-apache bundle or look into WAMPS for easy local deployment



http://www.wampserver.com/en/
anonymous
2009-09-07 01:58:19 UTC
PC don't come with PHP installed. If you want it installed...



PHP:



* Run PHP on your own computer: The easiest way to do this is to install a complete package like XAMPP. This contains the Apache Web server, along with PHP and the MySQL database engine, in one easy-to-install package. XAMPP is available for Windows, Mac OS X, and Linux. (A popular alternative on Windows is WampServer.)

* Run your PHP scripts on your Web host: If you already have a Web hosting account that supports PHP then you can upload your PHP scripts via FTP and run them on the Web server. The advantage of this approach is that you don't have to install anything; the disadvantage is that it's slower to write and test your scripts.



Copy and paste the script code listed above into a new document in your text editor, then save the file as hello.php in the document root folder — that is, the top level of your website — on your hard drive. If you're not sure where your document root folder is then consult your Web server manual. Common locations include:



* XAMPP on Windows: C:/Program Files/xampp/htdocs/

* XAMPP on Linux: /opt/lampp/htdocs/

* XAMPP on Mac OS X: /Applications/XAMPP/htdocs/



If you want to run the script on your Web hosting account rather than your own computer then you'll need to upload the script using FTP instead.



PHP Manual - http://www.php.net/manual/en/

A simple tutorial - http://us.php.net/tut.php



Ron


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...