Every time a newbie comes to ask questions, I find that most of them have not read the manual carefully.
For novices. I think "being able to read" manuals is a very important skill.
I believe you all have the same feeling as I did when I was a novice. After reading the manual, it’s almost the same as not reading it...
1. I can’t understand the manual (I don’t know where to start reading it. I should Which to read first)
2. I understand it a little bit but can’t use it (I don’t know how to use the method, where to write it, and I can’t solve the various errors reported)
3. After reading it, I can’t use it. I can’t help it (after reading it is the same as not reading it, unless you memorize the function and search it in the index next time)
Maybe you have other questions, you can tell us and we will study together~
Welcome the big guys to spray wildly. Only after the big guys spray can we, the rookies, make corrections and progress~
Then let’s improve our posture together! ! (Here we use the PHP manual as an example)
Recommended courses: PHP Tutorial.
What is a manual?
I believe everyone has read it since childhood. I think the manual is the instruction manual, just like the drawings for assembling a racing car when we were young.
How to read the manual?
I'm glad that I heard Master Yolo say, read the manual more often when you have nothing to do. I don't know what to think. Just start from the beginning and look at the directories one by one until you see how to read the definition of the function
The manual is really clear, but we Novices just think about how to learn more quickly and learn more, and they run all the way, but they forget the most basic things. They can't even read the instructions and they are trying to assemble a four-wheel drive racing car. I just want to emphasize that the manual is really important. You should read the manual corresponding to your own version.
Solution to the first problem: I don’t know where to start
First read the table of contents and read them one by one. It would be great if there is someone who teaches you how to read the manual (as shown in the picture above)
Solution to the second problem: Seeing that the function cannot be used
First of all, I will repeat it based on the definition of the function
Example 1: fopen() function, you We know that this is a function to open a file, but there is still a lot of implicit knowledge in it, do you know?
Example 2: What’s wrong with parameters with &
Solution Question 2: Where to write a function is determined based on logic
The so-called logic: My understanding is from top to bottom in the normal order of development of things (such as: The program is executed sequentially from top to bottom) or from left to right (calling methods in the class library or calling this class to call that class) (execute it step by step)
Solve the second problem : Reporting various errors will not solve the problem and requires step-by-step analysis. Here are some of my personal experiences
1. First, translate the error to know what it means (I’ll tell you secretly, Lingos Dictionary professional translation of IT words)
2. Print the code starting from where you feel the problem is, print it step by step, and see where the problem probably lies
3. Go to Baidu
4. Go home (go to the group) and ask the master for help
How to use the return value? Here we can use the bool return value and the false returned when opening the file in this example to do two things (2 mentioned in the above picture)
1. Debugging errors
2. Logical judgment
for(i=0;iThere are actually two methods<p></p>1. Just remember the general contents of the directory structure. <p></p>Function reference-》How to view the directory<p></p><p><img class="has lazy" src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/029/c18d93606413c8a1820b1f2854347828-9.png?x-oss-process=image/resize,p_40" alt=""></p>Open the third-level directory Later introduction: <p></p>Introduction: What is this extension used for? If you don’t understand, just Baidu<p></p>Requirements: Does this extension have any dependencies (consider it only after compilation and installation)<p></p>Installation: This extension does not need to be installed. When compiling and installing, which parameters should be used to install this extension? <p></p> Configuration: Do you need to modify the configuration of php.ini after installation? <p></p> Predefined constants: In fact It is used for the formal parameters of the function<p></p><p><img class="has lazy" src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/029/4534926a3a8f7730feee52f4c305f2a2-10.png?x-oss-process=image/resize,p_40" alt=""></p><p> How to quickly check: Careful friends, please observe that every time you click on the dictionary, it is the file directory included in the dictionary name </p><p><img class="has lazy" src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/029/4534926a3a8f7730feee52f4c305f2a2-11.png?x-oss-process=image/resize,p_40" alt=""></p><p> 2. If you want to check and operate files For related functions, even if you only remember the letter f, search in the index and click on which one looks like. After clicking, switch the manual from the index to the directory</p><p><img class="has lazy" src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/029/6cf2cbe79bc7410f22af6cf4ca0b2480-12.png?x-oss-process=image/resize,p_40" alt=""></p><p> <img class="has lazy" src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/029/6cf2cbe79bc7410f22af6cf4ca0b2480-13.png?x-oss-process=image/resize,p_40" alt=""></p><p> </p><p> </p><p> </p><p> </p><link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css"><link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
The above is the detailed content of How to read the php manual. For more information, please follow other related articles on the PHP Chinese website!

Setting session cookie parameters in PHP can be achieved through the session_set_cookie_params() function. 1) Use this function to set parameters, such as expiration time, path, domain name, security flag, etc.; 2) Call session_start() to make the parameters take effect; 3) Dynamically adjust parameters according to needs, such as user login status; 4) Pay attention to setting secure and httponly flags to improve security.

The main purpose of using sessions in PHP is to maintain the status of the user between different pages. 1) The session is started through the session_start() function, creating a unique session ID and storing it in the user cookie. 2) Session data is saved on the server, allowing data to be passed between different requests, such as login status and shopping cart content.

How to share a session between subdomains? Implemented by setting session cookies for common domain names. 1. Set the domain of the session cookie to .example.com on the server side. 2. Choose the appropriate session storage method, such as memory, database or distributed cache. 3. Pass the session ID through cookies, and the server retrieves and updates the session data based on the ID.

HTTPS significantly improves the security of sessions by encrypting data transmission, preventing man-in-the-middle attacks and providing authentication. 1) Encrypted data transmission: HTTPS uses SSL/TLS protocol to encrypt data to ensure that the data is not stolen or tampered during transmission. 2) Prevent man-in-the-middle attacks: Through the SSL/TLS handshake process, the client verifies the server certificate to ensure the connection legitimacy. 3) Provide authentication: HTTPS ensures that the connection is a legitimate server and protects data integrity and confidentiality.

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor