1. In the php directory, open php.ini and remove the following comments (the semicolon in front)
; On windows: ; extension_dir = "ext"
2 , add environment variables
win7: right-click Computer-Properties-Advanced System Settings-Environment Variables-System Variables-double-click (under xp, right-click My Computer-Properties-Advanced-Environment Variables- System variables-variable path-double-click)
3. Test (window r enter cmd to open the window command line)
php -v
Yes Just display the php version number.
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to add environment variables in php. For more information, please follow other related articles on the PHP Chinese website!