PHP learning trip in Shanghai
In September this year, I came to Shanghai Brothers to learn PHP. It has been 3 months since then. These three months have been hard and fulfilling. It gave me a completely different feeling from school.
Here, it is not so much learning as it is an internship before formal work. On the first day of class, the teacher told us that in the Brotherhood, we are not students, but students. Every day we have to hang up our student ID card before entering the class to study. The arrival time for class is also strictly stipulated. If we are late, we violate the rules and regulations and need to pay a fine. All entertainment activities such as playing with mobile phones and watching movies are not allowed in the classroom. Violators will still have points deducted and fined. The self-study time is until 11 o'clock every night. If you leave before then, you will leave early and it will be against the rules. All in all, there are a strict set of rules and regulations. From this point of view, isn't this just a practice for us to enter formal work positions in the future? Especially when I study in the evening until 11 o'clock, the teacher said, "I have been studying until 11 o'clock in the evening for five months. In the future, working overtime and so on will not be just a small case." I'm speechless...
The first period of time was undoubtedly the hardest. Everything here was unfamiliar. Most of the trainees who came to the training were not current students, but had some experience. Social workers with work experience. So I, a student who has not yet graduated, became one of the few "newbies" here. Putting aside study, the basic necessities of life are particularly inconvenient. Every inch of land in Shanghai is precious. We lived in a "hotel" arranged by the school, with 4 people and 2 bunk beds. There was a bed that was so small that I couldn't even lie flat in it, and the room was only about 12 square meters, so I couldn't find room to put a lot of things. I have to squeeze into the bus to go to school every day, and if I'm unlucky, I have to wait for 20 minutes, so I have to get up very early. The food in the cafeteria is extremely expensive. The same dish costs half the price in the university cafeteria, even though the food cost here is twice that of the university. I feel like crying when I think about it. I am tired from studying in the Brotherhood, and I don’t have a better resting environment when I come back. In contrast, college life is really like heaven.
Let’s talk about the hard work of studying. When they first came here, most of the students were completely blank about PHP. In order for us to get started and master the basics more quickly, the homework was relatively heavy. The homework during that period was like this: the teacher taught class for 4 hours in the morning. During these 4 hours, we had to type the code that the teacher typed three times. This was just the basic homework every day, and sometimes some practical application questions were assigned. But just typing code takes me 5 or 6 hours a day, sometimes more. Some students type more slowly and may not be able to complete their homework even at 11pm. During that time, I can only say that my eyes and fingers were greatly tested. In addition, review is a must. I don't have to deal with code and function typing that will come at any time. Here we have to talk about the characteristics of Band of Brothers - the continuous sitting system. At the beginning of the semester, the students in the class were divided into several groups. In silent writing, as long as one member of the group makes a mistake, the entire group will be punished for copying. This requires that no one in the group can hold back.
The learning progress of Band of Brothers is very fast. The rule here is that if you miss 3 days of classes, you have to move to the next class. This shows how "rich" the learning content is in one day. This requires us to review more and consolidate more, and we cannot learn the back and forget the front. I also understand this deeply. In the first two weeks, we learned some HTML statements and had to type them dozens of times a day. In my opinion, those statements were to the point where I could type them with my eyes closed, but later when I learned PHP, I came back to use these. html statements, I found that the difficulty of those statements changed from "1+1" to "11*11". I need to think about it for a while instead of just picking it up. At this point, I deeply realized how necessary review is in such rapid learning. This kind of understanding and experience has been constantly reminded by teachers since I was in elementary school, but this is the first time I have experienced such a profound understanding.
After studying for more than a month, our first "practical assessment" has arrived. We have to create an online mall on our own computers, including front-end and back-end management, and implement a series of processes from registration to receipt and payment. Function. The two weeks of production were the days when I felt the most fulfilled and accomplished in the past two months. Two days before the task, I always made some low-level mistakes, such as using the wrong database, which caused me to make no progress all afternoon. Some grammatical errors can also trip me up for 1 or 2 hours. But every time I learn something, I gain wisdom, and every little mistake has become my experience. As time went on, the project became smoother and there were fewer mistakes. Every time I complete a function, I feel a sense of accomplishment. What makes me proud is that my progress is among the top in the class, which gives me time to complete some additional functions and modify and improve my own projects according to my preferences. In the end, my project got a good result. At that moment, I felt that all the previous efforts and hard work were worth it.
Let’s not talk about the subsequent PHP learning. In short, the study here gives me a feeling that I have never had before. This may be the feeling of work. This kind of life is indeed hard, in my opinion even more difficult than the "hardest high school life", but the sense of fulfillment and accomplishment it brings is truly unparalleled. Many college students are very confused when they are approaching graduation. They have no clear plans and goals for their future, and they don't even know what kind of job they will do after graduation. But in these few months of training in Band of Brothers, I have a clear direction. The study and work here have enhanced my confidence and abilities bit by bit. I am no longer confused about the future and believe that I can find an ideal job. This is my biggest gain from joining Band of Brothers.
Brotherhood Gao Luofeng recruits disciples for free: http://www.hdb.com/party/lzcw-comm.html
Receive LAMP Brotherhood’s original PHP video tutorial CD/"Explain PHP in detail" free of charge, please contact the official website customer service for details:
http://www.lampbrother.net
【Brothers IT Education】Learn PHP, Linux, HTML5, UI, Android and other video tutorials (courseware + notes + videos)!
Network disk tutorial download: http://pan.baidu.com/s/1mg8ANMg
The above has introduced the PHP learning journey in Shanghai, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

To protect the application from session-related XSS attacks, the following measures are required: 1. Set the HttpOnly and Secure flags to protect the session cookies. 2. Export codes for all user inputs. 3. Implement content security policy (CSP) to limit script sources. Through these policies, session-related XSS attacks can be effectively protected and user data can be ensured.

Methods to optimize PHP session performance include: 1. Delay session start, 2. Use database to store sessions, 3. Compress session data, 4. Manage session life cycle, and 5. Implement session sharing. These strategies can significantly improve the efficiency of applications in high concurrency environments.

Thesession.gc_maxlifetimesettinginPHPdeterminesthelifespanofsessiondata,setinseconds.1)It'sconfiguredinphp.iniorviaini_set().2)Abalanceisneededtoavoidperformanceissuesandunexpectedlogouts.3)PHP'sgarbagecollectionisprobabilistic,influencedbygc_probabi

In PHP, you can use the session_name() function to configure the session name. The specific steps are as follows: 1. Use the session_name() function to set the session name, such as session_name("my_session"). 2. After setting the session name, call session_start() to start the session. Configuring session names can avoid session data conflicts between multiple applications and enhance security, but pay attention to the uniqueness, security, length and setting timing of session names.

The session ID should be regenerated regularly at login, before sensitive operations, and every 30 minutes. 1. Regenerate the session ID when logging in to prevent session fixed attacks. 2. Regenerate before sensitive operations to improve safety. 3. Regular regeneration reduces long-term utilization risks, but the user experience needs to be weighed.

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.


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

SublimeText3 Linux new version
SublimeText3 Linux latest version

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

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version
Visual web development tools

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