Run php script windows [CMD]

Salam.How are you? Today i am showing how to run PHP script on windows.It's very easy.If you don't know about PHP it is problem for you. So now we try to learn about php.

What is PHP?

  • PHP is an acronym for "PHP: Hypertext Preprocessor"
  • PHP is a widely-used, open source scripting language
  • PHP scripts are executed on the server
  • PHP is free to download and use


 okay. Now we try to learn about Run PHP.

 For run PHP Need
1) XAMPP [Download]
2) Browser [Mozila Firefox]
3) PHP Eclipse
Start MySQL . Apache from XAMPP and some config

Step:
1) open xampp And Start  Apache&MYSQL
 

2) Now open your Browser and go to the URL http://127.0.0.01
3) Now open your PHP File. Go to http://127.0.0.01/file.php [ Remember your file PATH is c:/xampp\htdocs\file.php ]

 ok. Now we run PHP script in CMD.
  1. Show Desktop.
  2. Right Click My Computer shortcut in the desktop.
  3. Click Properties.
  4. You should see a section of control Panel - Control Panel\System and Security\System.
  5. Click Advanced System Settings on the Left menu.
  6. Click Enviornment Variables towards the bottom of the window.
  7. Select PATH in the user variables list.
  8. Append your PHP Path (C:\myfolder\php) to your PATH variable, separated from the already existing string by a semi colon.

  9. Click OK
  10. Open your "cmd"
  11. Type PATH, press enter [ cd c:/xampp\htdocs php file.php ]

  12. Make sure that you see your PHP folder among the list.
That should work.
Note: Make sure that your PHP folder has the php.exe. It should have the file type CLI. If you do not have the php.exe, go ahead and check the installation guidelines at - http://www.php.net/manual/en/install.windows.manual.php - and download the installation file from there.

Sorry For poor English.
stay with Us.








1 comment: