


I encountered a bottleneck when getting started with PHP. How should I learn it?
Reply content:
PHP is a language that embeds HTML. This way of writing is normal, as long as there is a mark. The execution order of the html+js+php mashup page is:1. Execute the php part on the server side
2. Execute the js part on the client side
3. Render the html part on the client side Don’t worry, PHP is a system, not a language. I recommend learning PHP as follows:
1. Linux aspects
Linux common commands
1. File processing commands
2. Permission management commands
3. Help commands
4. File search command
5. Compression and decompression command
6. Command usage skills
7. Text editor Vim
Master the common command operations of Linux, learn the basic use of Linux, and be familiar with text editors under Linux.
Linux system management
1. Software package management
2. User and user group management
3. Service and process management
Master common system management operations in Linux systems.
Linux network application
1. Basic network settings
2. Network file sharing
Master common network configuration files and commands in Linux systems, and be familiar with file sharing services SSH and FTP.
LAMP environment compilation and Apache configuration
1. LAMP environment compilation
2. Apache basic options and application cases
Master the source code package compilation and architecture LAMP environment, and learn the basic configuration of Apache and typical Internet application configuration.
==================================================== ===============
2. Object-oriented programming
Introduction to object-oriented objects
1. The relationship between classes and objects
2. Object-oriented programming
Object-oriented It is a new function in PHP5, and it is also the way to write code in PHP in the future. Master the application of object-oriented in the industry, and understand some basic object-oriented declaration syntax.
How to abstract a class
1. Class declaration
2. Member attributes
3. Member methods
Instantiate objects through classes
1. Create objects
2. Allocation of object types in memory
3. Members in objects Access
4. Special object reference "$this"
5. Construction method and destructor method
Master the application of objects in the program, the allocation form in the memory, and the access methods of members in the object, and master it Construction and destruction and the use of keyword $this.
Encapsulation
1. Setting private members
2. Accessing private members
3. __set(), __get(), __isset() and __unset()
4. Four methods
Be sure to use it when using object-oriented Of the three major characteristics, encapsulation is one of them. Master the meaning of encapsulation, its applications and various magic methods related to encapsulation.
Inheritance
1. Application of class inheritance
2. Access type control
3. Overloading parent class methods in subclasses
Inheritance is also one of the three major characteristics of object-oriented. You need to master the meaning and application of inheritance. Access control and overloading methods.
Common keywords and magic methods
1. Application of final keyword
2. Use of static and const keywords
3. Cloning objects
4. Common method __toString()
5. Through __call () method handles error calls
6. Automatically loading classes
7. Object serialization
In PHP object-oriented programming, some common keywords and some common magic methods are used, which need to be mastered and able to Flexible use.
Abstract classes and interfaces and polymorphism
1. Abstract methods and abstract classes
2. Interface technology
3. Application of polymorphism
Understand the role of abstract classes and interfaces, and master their declaration and application, focusing on mastering multiple Morphological applications.
System functions related to classes and objects
1. System functions related to classes
2. System functions related to objects
There are not many functions related to classes and objects provided in PHP, but they are more commonly used
Commonly used function classes Writing
1. Pagination class
2. Verification code class
3. Image processing class
4. File upload class
5. Data verification class
By writing these classes, it is not only convenient for you to use them in all PHP projects These functional classes can also summarize object-oriented technology.
==================================================== =============
3. Abstraction layer PDO
Databases supported by PDO
1. PDO applications and supported databases
Master the application principles and driver settings of PDO, as well as PDO Installation methods, and you can create PDO objects in a variety of ways, and you need to understand the members in the PDO object.
Create PDO objects
1. Call constructors in various ways
2. Member methods in PDO objects
Use PDO objects
1. Adjust the behavioral properties of PDO
2. PDO handles data between PHP programs and databases Type conversion
3. Error handling mode of PDO
4. Using PDO to execute SQL statements
You need to master the application, setting and reading of various properties in PHP, as well as the error handling mode of PDO, and you also need to understand the execution of SQL statements through PDO .
PDO’s support for prepared statements
1. Understand the PDOStatement object
2. Prepare statements
3. Bind parameters
4. Execute prepared queries
5. Get data
PDO’s preprocessing objects can complete PHP programs and various operations between databases. You need to know how to use PDO to prepare prepared statements, bind parameters, execute prepared statements, obtain access to data and big data objects, and use PDO to complete transaction processing operations.
PDO transaction processing
PDO transaction processing method
======================================== ===========================
IV. Script JavaScript
JavaScript syntax
1. Overview of JavaScript application
2. Variables and variables in JavaScript scripts Operators
3. JavaScript flow control and functions
4. Creation and application of arrays and objects in JavaScript
You can learn all the syntax of JavaScript, use it in conjunction with HTML and CSS, and write some common scripts on pages .
DOM Programming
1. Introduction to the application of DOM and DHTML
2. Application of various events and event handlers
3. Properties and methods of window object
4. Application of document object
5. Its location, body , form, screen and other objects
Learn the flexible application of DOM in the page, event processing, as well as the properties and methods of various DOM objects, and the writing of all special effects in the web page.
==================================================== ===============
5. Ajax
Ajax application
1. Ajax overview
2. Ajax definition
3. Using Ajax to create an Ajax engine
4. Ajax Web application pattern (Asynchronous)
5. Applications in AJAX development
6. Writing and applying custom Ajax classes
7. Using Ajax to complete XML operations
8. Applying Json technology in Ajax
9. Applications of Ajax3.0
To understand Learn how to transfer data asynchronously, and master the creation of AJAX objects and the application of properties and methods in AJAX objects.
==================================================== =================
6. Ajax and JQuery framework application
Usage of JQuery
1. Overview of JQuery
2. Core methods of JQuery
3. JQuery selector
4. Properties of JQuery
5. Filtering and document processing of JQuery
6. CSS application of JQuery
Master the application of adding JQuery in HTML files. You can use the core methods in JQuery, as well as the use of common selectors, and some Commonly used JQuery methods.
Ajax application of JQuery
1. JQuery events
2. JQuery effects
3. Using AjAX application in JQuery
Ajax is the key technology implemented by JQuery. Master several implementation methods in JQuery.
==================================================== ==============
Seven. Design patterns
MVC pattern
1. Introduction to MVC pattern
2. View
3. Controller
4. Model
5. Modules and operations
6 . Main entry file
7. MVC pattern application
You need to master the MVC design pattern, including the application of views, controllers, and models. It is best to be able to use other design patterns.
==================================================== ===========
8. Code specifications
PHP coding specifications
Database specification settings
Template writing specifications
1. Scope of application
2. Development tools
3. PHP file format
4. Comments Specifications
5. Empty lines and blanks
6. Use of strings
7. Naming principles
8. Language structure
9. Design of numerical tables
10. Index design principles
11. Design of SQL statements
12. Templates Design specifications
================================================== ==============
9. Version control
github and svn
========================== =====================================
10. Framework
Understand some frameworks, such as Laravel, Yii , CodeIgniter, ThinkPHP and other
php learning materials can be downloaded from Baidu Cloud
6miu Baidu Cloud Searchhttp://baiduyun.6miu.com/
Famiba Netdisk Searchhttp ://pan.famiba.com/
Ouch network disk search: http://www.aiyoweia.com/ It is recommended to watch the video directly and watch Lao Han's. There is also the red book that I read only after I started working. It is very rubbish and is not suitable for beginners at all, let alone veterans. Looking at the picture in question, it seems that the php code is embedded in the html code, which makes you feel messy? In fact, you can understand it this way, the PHP code embedded in HTML ignores the HTML code, and HTML ignores the PHP code, but the output from PHP will be rendered together by the browser. From your description, it seems like you don't have much programming experience, which is really troublesome. Your so-called bottleneck should not be entangled in grammar. I just want to see how you were taken to the ditch. Language is a tool, and all you learn is PHP syntax. Next, do more projects and find a sense of accomplishment in the projects.
Believe me, after completing the project, you won’t feel any bottleneck.
Enough for you! What you get on paper is shallow, but you know you have to do it! What books teach you are concepts. Don’t read too much about the code, let alone copy it page by page. On the one hand, it’s very boring and on the other hand, most of them have not kept pace with the times (that is, most of them are outdated), but the ideas It won’t be outdated, and your progress will be more obvious in practice. If someone forces you to do it, you will make progress much faster. If you don’t have strict self-discipline, then try to make a decent registration and login page! What, no? Search online, and you may be able to see satisfactory results in an hour or two, and then carefully understand and digest it until you understand the entire logical process and the knowledge points involved, and then go on to do more complex functions. Knowledge lies in Accumulation, over time, I understand even if I don’t want to understand, and form a conditioned reflex. I think you are reading the wrong book. The basics of php are based on PHP: PHP ManualAh, some books will lead you astray about HTML. If not, check out the w3school online tutorial. I think the grammar object is basically enough. The situation you mentioned won't happen again... I'll finish it in a month at the latest... Besides, this thing is not for you... You have to hit it with your hands...

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.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


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

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
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

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment