No, the browser's most basic language is html
In other words, the browser can only understand html, css, js, etc.
For other server-side dynamic scripts, such as php, jsp, etc., the parsing work is done on the server!
For example, everything you see on the computer display, you see on the display, but their operation is running in the computer host, the display is just a display!
Of course, browsers cannot parse php, so why can you view the contents of php and other files in the browser?
That's because there is a php parser on the server, such as apache + php. When the browser requests a php file, the parser will logically process and compile the php file, and then convert the compiled result into an html source. Send to browser for display. . . .
Follow up:
Wow, great god, just wait for this explanation, wait for your hard work!
1) In this way, I know the role of apache. Does the apache server come with php and jsp parser?
2) When data is exchanged, in what form does the data transmitted by the server to the browser exist? Is it parsed html program or binary code?
Post reply:
1, apache is just a web parser, it does not have any server-side script, such as php or something
To parse php, you need to go to the php official website to download the corresponding version and integrate php with apache. In fact, you can load php as an Apache component or module on apache.
2. Is it binary? I do n’t really care about this. Anyway, the browser only parses html, that is, no matter what the language of the webpage is, the operating mechanism process is different. In the end, it must be converted into html. In other words, html is The basics of web pages!
The webpage language has html and php.jsp. No matter what language the browser can always display normally, is the browser to complete this parsing work?