How to run php script in windows dos command prompt

Need to change the PATH, to make the exe file run default.
For that steps:

Open control panel
Go to System
Choose the Properties tab
Click Environment variables
From this screen you can edit the environment variables of the system. If you only wish to modify them on your user account, click New under your own variables box and type in the following:

Variable name: Path
Variable value: %PATH%;C:\path\to\php

If you want the change to affect all users on the system, choose the Path variable from the system variables box and click Edit.

Append the variable value with:

;C:\path\to\php

Note the ; character. It’s used to separate directories in the var, so be sure it’s present.

Again, C:\path\to\php is where your php.exe is located.

Geef een reactie

Fill in your details below or click an icon to log in:

WordPress.com logo

Je reageert onder je WordPress.com account. Log Out / Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log Out / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log Out / Bijwerken )

Verbinden met %s