Hongmu Notes
Home Language Notes

Language Notes

Video streaming platform using DPlayer tutorial for playing M3U8 videos.

Video streaming platform using DPlayer tutorial for playing M3U8 videos. Language Notes PHP

First, load the necessary DPlayer CSS files: <link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">; and the JavaScript file: <script src= "https://cdn....">
👁 256
A novel reader written in html, php, ajax

A novel reader written in html, php, ajax Language Notes PHP CSS JavaScript Bootstrap

Pure reading version: <?php // index.php session_start(); $uploadDir = 'books/'; $booksFile = $uploadDir . 'books.json'; // Initialize the book storage directory if (!file_exists($uploadDir))…
👁 171
In ul, how to divide 6 li into two columns?

In ul, how to divide 6 li into two columns? Language Notes CSS

In HTML and CSS, there are many ways to display the six <li> elements in <ul> into two columns. Here are several common methods: Method 1: Using CSS Flexbox, you can set <ul> as a flex container, and then set the flex-wrap property to wrap, and specify the occupancy of each <li> element...
👁 499
PHP+HTML+bootstrap simple page verification, beautiful

PHP+HTML+bootstrap simple page verification, beautiful Language Notes PHP Summary of pitfalls

Rendering, enter the password to access the original page. Super simple, super usable code! Code: // Verify password logic $correct_password = 'www.4s5.cn'; // Set the correct password $is_authenticated = false; if (isset($_POST['password'])) { i…
👁 273
There is an a tag under the li tag. When the mouse is placed on the li tag, how can I make the a tag change color?

There is an a tag under the li tag. When the mouse is placed on the li tag, how can I make the a tag change color? Language Notes CSS

To make the inner a tag change color when the mouse is placed on the li tag, you can use CSS's :hover selector combined with the descendant selector. Here's a simple example: Let's say your HTML is structured as follows:<ul> <li><a href="#">Link 1</a></li> &l…
👁 228
When sql statements are queried in, they are sorted according to the order in in.

When sql statements are queried in, they are sorted according to the order in in. Language Notes PHP mySql

Original SQL statement: $sql=$empire->query("select classid,sonclass,classname,islast,islist from {$dbtbpre}enewsclass where classid in (1,22,239,241,75,80,45,62)…
👁 189
How to pass variables to js files in php? (How does the code in the js file obtain external variables?)

How to pass variables to js files in php? (How does the code in the js file obtain external variables?) Language Notes PHP JavaScript

If you want to pass variables from PHP into a JavaScript file, you have a few options: Inline JavaScript: You can use PHP variables directly in JavaScript code in an HTML file, just like you did in the example code. This allows PHP to include the values of PHP variables when generating JavaScript code. But this…
👁 210
When using Pagoda as a reverse proxy, how does PHP obtain the domain name of the source site?

When using Pagoda as a reverse proxy, how does PHP obtain the domain name of the source site? Language Notes PHP

Website: 4s5.cn now wants to access 123.4s5.cn through a reverse proxy. My current idea is to obtain the domain name 123.4s5.cn through 4s5.cn’s PHP! I have been exploring for a long time, and finally found that when writing reverse proxy rules, I can directly set the rules and pass 123.4s5.cn! location / { proxy_pass …
👁 224
HTML+CSS+Swiper realizes the idea of sliding left and right in three columns on NetEase Cloud mobile phone

HTML+CSS+Swiper realizes the idea of sliding left and right in three columns on NetEase Cloud mobile phone Language Notes CSS JavaScript

First use Swiper to slide left and right! Then use HTML+css to realize text and picture layout display! Code: 🔒 Hidden content: Members can view <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <tit…
👁 188
jQuery modifies the height-to-width ratio of the banner display in real time

jQuery modifies the height-to-width ratio of the banner display in real time Language Notes JavaScript

Recently, I encountered some problems when modifying the PC side to a responsive template. For the slides on the PC, they do not use the img tag to display them directly. Instead, they use a li tag and then set a background image for the li tag. And set a fixed height for the background image. So I found that if I want to control the height of this slide by writing css, it is better to control it directly with js. function setFlashHeight()…
👁 172
1 2 3 4 5 33