Wednesday, July 26, 2017

[php][windows] force using specific php version to run command

method 1 

Type this in command prompt:
set PATH=%PATH%;YOUR_PHP_DIRECTORY
for example:
set PATH=%PATH%;C:\xampp\php

method 2 

Using this command to specify the executable file to run the command prompt:
C:\xampp\php\php.exe -n -v
text in yellow is the php .exe you wanted to use for execute, and text in green is the command you want to execute. It's to check php version in this case/



Reference

https://stackoverflow.com/questions/15517718/php-version-on-windows-command-line
https://stackoverflow.com/questions/7767447/how-can-i-force-php-version-for-command-line

No comments :

Post a Comment