Description of ThinkPHP3.2.2 plug-in controller function and thinkphp3.2.2. Description of ThinkPHP3.2.2 plug-in controller function. thinkphp3.2.2 description of ThinkPHP supports calling of plug-in controller from version 3.2.2. you can access ThinkPHP3.2.2 plug-in controller function in the module through a more convenient URL. thinkphp3.2.2 description
ThinkPHP versions 3.2.2 support calling plug-in Controllers. you can access the controller defined by a plug-in the module through a more convenient URL address.
When the plug-in controller variable is input in the URL, the operation method in the plug-in controller is automatically located.
The variables of the plug-in controller are set by the VAR_ADDON parameter. the default value is addon. for example, we input the following variables in the URL:
http://serverName/Home/info/index/addon/SystemInfo
Because the addon parameter is passed in, the User controller here is not the original
Home/Controller/InfoController.class.php
Instead, call the InfoController controller of the SystemInfo plug-in (located under the Home/Addon directory). The file is located in
Home/Addon/SystemInfo/Controller/InfoController.class.php
The plug-in controller itself is defined like a common access controller, for example:
namespace Home\Addon\SystemInfo\Controller; class InfoController extends \Think\Controller{ public function index(){ echo 'Addon SystemInfo'; } }
In this way, we are accessing
http://serverName/Home/info/index/addon/SystemInfo
Will output
Addon SystemInfo
If our plug-in directory is not Addon but Plugin, we need to define it in the configuration file:
'VAR_ADDON' => 'plugin'
Then the access URL becomes
http://serverName/Home/info/index/plugin/SystemInfo
Note that:Currently, the plug-in controller only supports module plug-in controller access and does not support global public plug-ins.
Briefly describe the composition of the controller and the functions of each part
Basic components of PLC:
1. Central Processor: receives and processes data, receives the status and data of input devices in the field by scanning, self-diagnoses, and completes the logic arithmetic operation tasks specified in the user program.
2. memory: There are three types of RAM, EPROM, and EEPROM
EPROM: Stores System programs, read-only memory, and cannot be changed.
RAM: stores I/O images and various types of soft devices. it is a type of read/write memory with high storage speed.
EEPROM: a erasable read-only memory.
3. input/output (I/O) interface: it is the connection component between the CPU and the on-site (I/0) device or other external devices.
4. Power supply:
5. the programmer is used to compile, edit, debug, check, and monitor user programs.
Briefly describes the main functions of the CPU controller.
CPU principle
The main function of the CPU is to execute programs stored in the main memory, that is, machine commands. the CPU is controlled by the controller and memory.
Overview
This chapter focuses on the basic components of the CPU and the command process. this involves the core issue of establishing the concept of the entire machine: How the CPU executes commands, how the computer stores information, and how to control the input/output.
1. basic CPU components
2. draft the instruction process
1. basic CPU components
When understanding the composition of the CPU, you need to grasp the following points:
(1) ALU component and its input and output methods.
(2) a set of register R0-R3 or register C, D, Z for operation
(3) a group of registers used for control: Instruction Register IR, program counter PC, Program Status Word register PSW
(4) a set of memory registers related to memory access: memory address register MAR, memory data status register MCM, stack pointer SP
(5) connection method of the internal general route, how to send information to it, and how to output information
(6) How does the CPU connect to the primary storage and I/O devices through the general system route?
3.3.1 provides a simplified internal CPU composition model, which serves as the basis for drafting the instruction process,
2. draft the instruction process
The instruction process is a core component of the computer's working principle: How the CPU executes the program instruction assessment is to give a specific instruction in the context of the CPU composition of the model machine, use command statements to describe the reading and execution processes. the key is to be familiar with the implementation process of several basic addressing methods to identify who is the source address, who is the destination address, and what is the operation code.
For example, the read and execute processes of the MOV-(SP) and X (R0) commands are proposed.
Learning content:
3.1 arithmetic and logic components ALU
3.2 calculation method
3.3 CPU model composition and data path
3.4 time series Control mode
3.5 command execution and logic controller combination
3.6 microprogram controller
Objective:
Measure the test taker's understanding about the logic and structure of the all-processors, the parallel processors and the carry chain used, and the SN74181 function of the multi-functional arithmetic logic operation component.
Master the fixed-point addition and subtraction operations, shift operations, understanding of floating-point addition and subtraction operations, decimal addition operations, mastering the multiplication of unsigned integers by one digit, learning about its logical implementation, and mastering the division of unsigned integers by one digit, measure the test taker's knowledge about floating-point multiplication and division operations.
Objective:
Master the basic components of the model machine, data transmission and transmission, and master the basic form of micro-commands.
Understand the functions of the controller, master the command flow and the working principle of the combined logic controller.
Master the concept of micro-program control, understand the micro-instruction encoding and order control methods, and understand the micro-instruction format.
Key and difficulties:
Fixed-point addition and subtraction of the complement code, multiplication and division of unsigned integers by a single digit (difficult)
The basic components of a model machine, data transmission and transmission, and the basic form of micro-commands.
Command flow and the working principle of the combined logic controller (important)
Lesson schedule:
9 lessons.
Media usage:
Multimedia projection is mainly used for the electronic teaching plan prepared by PowerPoint.
§ 3.1 arithmetic and logic components ALU
ALU is a powerful integrated logic circuit, sometimes called a multi-function generator.
The core of ALU is the calculator.
ALU performs fixed-point arithmetic and logical operations on binary code.
§ 3.1.1 addition unit
Full processors and half processors:
An-1... Ai... A2 A1 A0
Bn Bn-1... Bi... B2 B1 B0
+ Cn Cn-1... Ci... C2 C1 C0
The full addition device is the addition unit of three inputs, and the half addition device is the addition unit of two inputs.
Full addition and Σ I + carry-on Ci to the high bit
Carry Ci
Input
Output
Uses a half-jiaset to form a full-jiaset.
(1) the semi-increment sum can be implemented by an exclusive or gate:
Semi-sum = AiOBi (logical form of the semi-jiader)
A half-jiaset is also called an exclusive OR gate.
(2) full processors = two semi-processors. The logic is as follows:
Σ I = AiOBiOCi
C I + 1 = AiBi + (AiOBi) Ci
Because there is a delay time in the logic gate circuit, the full amplifier circuit is a delay component, and its characteristics will affect the speed of the full amplifier.
+
+
+
+
+
§ 3.1.2 Structure of parallel processors and carry chain
Parallel jiaser: uses the n-bit full jiaser to add two n-bit operands at the same time.
ThinkPHP versions 3.2.2 and later support calling plug-in Controllers. you can use a more convenient URL address to access a module...