Skip to main content

How to run a PHP program from command prompt on a Windows Machine?

 his way I'm able to run the PHP programs finely but I want to run the same program from Windows Command Prompt

For it I done following steps :

  • Went to Advanced System Settings (Control Panel\System and Security\System\Advanced System Settings)
  • Then clicked on Environment Variables
  • Then selected the variable Path
  • Then clicked Edit... button
  • Then after the ending semicolon of existing string I added the string "C:\xampp\php" by adding a blank space after the semicolon.

Skip to Step 4 by left clicking the Windows Start Button and then immediately type system env, windows search will suggest Edit the system environment variables, Click this and and go to step 4.


  1. Right Click Windows Start Button, Select System

Right Click Windows Start Button > System

  1. Click on System Information

Click on System Information

  1. Click on Advanced System Settings

Click on Advanced System Settings

  1. Click on Environment Variables

Click on Environment Variables

  1. Select PATH under System Variables heading then click Edit.

Under System Variables, Click on PATH then click Edit

  1. Click New, Type in Path location for executable file

Click New, Add Path location to executable file

  1. Press OK and APPLY on all applicable panels then restart the computer.

After the above open  Windows Command Prompt


run php.exe 

I hope now its working fine 



Comments

Popular posts from this blog

Sublime vs Dreamweaver

13 REASONS TO USE OF SUBLIME TEXT OVER DREAMWEAVER 17 MARCH, 2014 BY TOM ELLIOTT I started writing this post over a year ago but back then it was entitled something along the lines of ‘Reasons why I use Dreamweaver over code editors’. This was biased, as I hadn’t properly explored other code editors like Coda, Sublime Text or Notepad++. So, wanting to write an objective post from a web developers point of view, and because I had heard many good things about it, I setup Sublime Text 2 and dove straight in. I’m glad I did because it quickly became obvious that my presumed reasons for Dreamweaver’s superiority were just wrong. We are all creatures of habit to a greater or lesser degree and when we develop workflows to help make our lives easier, we can get entrenched in the view that these honed practices are superior. It’s not our fault, confirmation bias is supposedly  programmed in our DNA . Even so, it’s healthy to try and keep questioning and challenging ourselves, espe...

Difference Between Primary Key and Unique Key In Sql Server

Both  PRIMARY KEY  and  UNIQUE KEY  enforces the Uniqueness of the values  (i.e. avoids duplicate values) on the column[s] on which it is defined.  Also these key’s can Uniquely identify each row in database table. Below table lists out the major  difference between PRIMARY KEY and UNIQUE KEY : PRIMARY KEY UNIQUE KEY NULL It doesn’t allow Null values. Because of this we refer PRIMARY KEY = UNIQUE KEY + Not Null CONSTRAINT Allows Null value. But only one Null value. INDEX By default it adds a clustered index By default it adds a UNIQUE non-clustered index LIMIT A table can have only one PRIMARY KEY Column[s] A table can have more than one UNIQUE Key Column[s] CREATE SYNTAX Below is the sample example for defining a single column as a PRIMARY KEY column while creating a table: CREATE TABLE  dbo.Customer ( Id  IN...

JazzCash Mobile Account

  JazzCash Mobile Account Help Center  > JazzCash Mobile Account What is JazzCash mobile account? JazzCash Mobile Account is an actual bank account that is tagged with your mobile number and can be operated through your phone. Through this Mobile Account you can enjoy complete freedom of accessing financial services anywhere, anytime! More importantly, you don’t have to rely on traveling to a Bank branch, wait at queues or complete any documentation. Mobile Account menu works on all types of mobile phones – smart phone is not required. Customers can make deposits or withdrawals through any Mobilink Microfinance Bank Branch, Mobilink Franchise, Mobilink Business Center and Jazzcash Agents spread across Pakistan. JazzCash Mobile App In line with the continuous digitization of its services to meet demands of growing number of smartphone users, JazzCash is proud to announce Android based App for its Mobile Account users. The App offers a user friendly inte...