Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that displaying php on the command line is not an internal command

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to solve the problem that the command line display php is not an internal command, the article is very detailed, has a certain reference value, interested friends must read it!

The command line shows that php is not the solution to the internal command: 1, right-click on the computer, select "Properties"; 2, find and select "environment variable"; 3, find the "Path" variable in the system variable; 4, enter the directory where PHP is located.

This article operating environment: Windows7 system, Laravel5.8.1 version, Dell G3 computer.

There may be an error when viewing the laravel version from the command prompt:

'php' is not an internal or external command, nor is it a runnable program or batch file.

Generally, it is because the environment variable is not set.

Method

Right-click on the computer or my computer and select Properties

Select Advanced system Settings

Select Environment variable

Find the "Path" variable in the system variable and edit

Add a semicolon in English and enter the directory where PHP is located.

After editing, remember to click OK to save the modified variables

It may not work, as shown in the following picture. Because php still needs to be restarted

The laragon novice didn't find out how to rerun php, so the computer rebooted directly. Looking at the laravel version after reboot, you can see that the php command can be used.

The above is all the contents of this article entitled "how to solve the problem that php is not an internal command on the command line". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report