search
HomePHP FrameworkThinkPHPDetailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

First configuration changes and library class changes

Open debugging mode
5.1 configuration file is in the app/config folder // Application debugging mode in app.php under 'app_debug'=> false, change it to true.
Changes in library class calling
Original: use:think\Request; Now use:think\facade\Request;
Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

You can use version 5.0 Method
$id = Request::instance()->param('id/d');
Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

Verification issues in version 5.1

It keeps reporting that app/index/course->Validate;

The solution is to rewrite in model/Course.php:

Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

Create database time zone problem

Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

##java.sql.SQLException: The server time zone value 'Ãà ¹ú±êüñ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.


Cause of time zone problemCause: When using mysql’s jdbc driver (6.0), problems caused by the time zone difference between the database and the system are encountered .

Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1
SolutionAdd
?serverTimezone=UTC

jdbcUrl=jdbc:mysql://localhost:3306/course?serverTimezone=UTC

If there is a Chinese garbled problem Solution

jdbcUrl=jdbc:mysql://localhost:3306/course?serverTimezone=Asia/Shanghai&characterEncoding=utf8

Environment variable installation

Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

##JAVA_HOME: JDK installation directory

Function: Other related environment variable configurations can be referenced, which is more convenient and concise.
Path:%JAVA_HOME%bin;%JAVA_HOME%jrebin;
Function: Allow the system to find and call java.exe and javac.exe.
classpath:.;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar
Function: The role of the classpath environment variable--tell the java virtual machine that all executable files.class Where

Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1

Let us make sure the installation is successful

Press the shortcut key Win R, enter cmd, and press Enter.
Check whether the Java environment is configured successfully

Enter

java


Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1Then we enter

javac


Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1Finally, enter

java -version


Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1You can see the above three pictures, and the environment variables are configured. .

The above is the detailed content of Detailed graphic explanation of the steps and methods for installing jdk environment variables in TP5.1. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.