I am using WAMP. I want to use php from the command prompt. What is the entry in PATH env variable for this ?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You need to put the directory that has
php.exe
in youWAMP
installation into yourPATH
. It is usually something likeC:\wamp\xampp\php
It depends on your OS, but if you are on Windows XP, you need to go to Systems Properties, then Advanced, then Environment Variables, and include the php binary path to the %PATH% variable.
Locate it by browsing your WAMP directory. It's called php.exe
You need to add the PHP directory to your path. On the command line (e.g. in a batch file), it would look like this:
if in doubt, it's the directory containing the
php.exe
.You can also pre-set the path in Windows' control panel. See here on how to do this in Windows 7 for example.
Be aware that if you call the PHP executable from an arbitrary directory, that directory will be the working directory. You may need to adjust your scripts so they use the proper directories for their file operations (if there are any).
Follow this for Windows operating system with WAMP installed.
Try display phpinfo() by file and check this var.
You May use
set
keyword for set the pathif all the path are set in path variables
If you want to see all path list. you can use
you need to append your php path behind this path.
This is how you can set environment variable.