Home > PHP Framework > ThinkPHP > body text

Three ways to check the current version number of thinkphp

藏色散人
Release: 2021-02-03 18:48:33
forward
15311 people have browsed it

The following tutorial column of thinkphp will introduce you to three methods of checking the current version number of thinkphp. I hope it will be helpful to friends in need!

There are two ways to check the current thinkphp version, the first one I commonly use

( Version 5.0 and below)

TP defines a constant (THINK_VERSION),
is used to store the version number of the current system. If you need to check, you can print it directly
var_dump(THINK_VERSION );
Three ways to check the current version number of thinkphp## The second type (version 5.1)

Enter on the command line


php think version
Three ways to check the current version number of thinkphp The third type (5.1 version)

5.1 version changes the constant THINK_VERSION to App::version()

use think\facade\App;

before printing You can print directly


var_dump(App::version());
Three ways to check the current version number of thinkphp

The above is the detailed content of Three ways to check the current version number of thinkphp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template