Most network programs are in C/S mode, that is, the client and server transmit data and interact with each other. Web applications are in C/S mode, and the browser serves as a universal client, so we often use B/S to describe this mode. In the Web, the client (browser) is the front end, the server is the back end, and the front and back are relative to the programmer.
I don’t think it’s appropriate to say whether PHP is used for front-end or back-end. PHP runs on the back-end (server side), and the running results will be sent to the front-end (client, browser) for display.
Just like the editor of a newspaper office, he writes the article in the newspaper office, prints it in the newspaper, and then sends it to you for you to read. From my personal understanding, there is actually a difference between front-end in a narrow sense and front-end in a broad sense.
Everyone has already made it clear that the front end in the narrow sense is "the visible part (in the browser)". The main technologies are HTML, CSS, JavaScript, Flash, siverlight, etc.
The broad front-end includes the page output by the server to the user's browser, which is the View layer in the MVC framework. The corresponding back-end is service and data access. In the server, the front end will encapsulate part of the logic of page display. For example, when rendering a table, a loop will be made at this layer (of course it can also be rendered with js), or a form will be produced. Because it is executed on the server side, the advantage is that it is fast and safe.
Of course, the function of PHP is not limited to the output page, but also the logic layer, service layer and DAO, and perhaps reading and writing files, message queues, event mechanisms, etc. Strictly speaking, PHP does much more on the backend than on the frontend. Different companies may have different understandings of this. I think there is no need to be serious about this. Even students who work in narrow front-end work will be very beneficial to understand the PHP framework.
The above is the detailed content of Is php front-end or back-end?. For more information, please follow other related articles on the PHP Chinese website!

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

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

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
