PHP routing implementation principle, please give me some advice

After using the framework for a while, I suddenly realized that it seems that the core of the MVC framework is routing. Can you please enlighten me on the specific principles. For example, TP5 routing is very powerful, but the source code has basically no comments. After reading it for 2 hours, I still don’t understand the whole process. How it is. All I can do now is the pathinfo step. I can’t understand the various rule routing and regular routing that follow. I hope you can give me an implementation process, or a specific demo, or tutorial, which can be related. Books are also available O(∩_∩)O Thank you! Reply content: After using the framework for a while, I suddenly realized that it seems that the core of the MVC framework lies in routing. Can you please enlighten me on the specific principles? For example, TP5 routing is very powerful, but the source code has basically no comments. After reading it for 2 hours, I was stunned. Understand what the whole process is like. All I can do now is the pathinfo step. I can’t understand the various rule routing and regular routing that follow. I hope you can give…

How to use php’s curl to grab lazy loaded images, please give me some advice

Crawl image information, but lazy loading can only load part of it. How to crawl all images Reply content: Crawling image information, but lazy loading can only load part of it, how to crawl all images Lazy loading means that when you slide down, the website will request an interface via Ajax again, which is a bit similar to paging. You need to look at the link of his ajax request and then crawl to the corresponding link. This crawling has something to do with how your regular matching is written. curl just simulates a request

How to use php’s curl to grab lazy loaded images, please give me some advice

php Write your review! Come on, watch it all Member login | User registration Recommended reading include discuz wishing pool plug-in remote inclusion vulnerability-Discuz The discuz wishing pool plug-in remote inclusion vulnerability is an article on the Discuz forum in Qian Self-Study Introduction: The problem with the wish.php file of the wishing pool plug-in: require $discuz_root..includediscuzcode.func.php; Manual exploitation method: remote inclusion vulnerability , variable di… [detailed] Crayon Shin-chan 2023-09-16 22:22:51 include php Is this the job of Mysql foreign keys? I’ve read a lot about foreign keys in MySQL over the past few years, although not recently. I know they are great for using sub-posts under forum topics, for example if I delete a post related to that topic, There are 100 posts related to this topic… [detailed] Crayon Shin-chan 2023-09-16 22:22:27

I have some questions about some APIs in php, please give me some advice.

1: There are some APIs in PHP that I don’t know how to use, and I don’t know what scenarios are most suitable for them. Whether it’s parameters or return values, I don’t understand them all. Don’t ask me to read the manual. I’ve read the manual many times. . For example, what can pack be used for? It’s a big headache. There are really many APIs like this that I don’t quite understand the applicable scenarios. Please give me some guidance. 2: php://stdin, php://stdout, php://input are difficult to understand. I really don’t know what they refer to. Please explain them in a simpler way. 3: Asking a question, it is relatively superficial. Many reversible encryption algorithms are written to convert the string into binary and perform bit operations with the secret key. Finally, the encrypted string is obtained, and then the encrypted string is converted into 2. Operate the base and the secret key to get the real string. I just want to know, why do you have to convert it to binary? Why does it have to be converted to binary? why? I don’t understand. Binary bit operations look too awkward! ! ! ! 4: Many frameworks have…

Dear technical experts, I want to learn PHP, please give me some advice.

Programming is a technical job that not everyone can learn. To be able to endure loneliness, those who engage in programming need a heart willing to delve into it. Many companies like people who are self-taught and don’t like people who come from training institutions. Because programming technology is updated day by day, self-learning ability is very important for continuous learning. If you are a person who is good at self-study and make good use of network resources, you can still learn very well and become a programming master. The general tuition fee for learning PHP in training institutions is around 13,000. In fact, after you work, you may not be able to save 13,000 in a year. Therefore, if you want to learn programming, it is best to choose self-study. If after self-study for a period of time, you find that you really can’t do it, then what you should consider is not to go to training, but to consider whether I am capable of programming. Programming is not a big deal. , you can learn if you want to. Programming is not a cabbage, you can learn it if you want, so I want to go for training.…

I just started learning PHP, please give me some advice.

I just started learning PHP, please give me some advice.

I just started to learn PHP, please give me some advice If any seniors have PHP teaching videos or useful e-books, please send them to me. . . [email protected] Thank you ——Solution——————–Just follow the manual and type the examples in Chinese The manual can be downloaded from the official website. Other videos and other videos are all extensions of the manual, remember! Young man, the manual is the way to go….—- –Solution——————–[Details on PHP].Gao Luofeng ——Solution——————–I think the videos on Chuanzhi Blog are pretty good, they are quite detailed and full of content. It is clear, and there is also a help document that LZ can cooperate with php5 when developing and learning. Searching online is all——Solution——- ————-Go and learn PHP100 or LZ——Solution— ——————Sao Nian goes to php100, downloads the free videos and watches them, and then you can basically get started by doing more by yourself… ——Solution– ——————Pull an order to do, set the time, bite the bullet and do it, and the future will be easy——Solution——————– Quote: I think the videos on Chuanzhi Blog are pretty good. They are quite thin, clear and clear. There are also help documents for PHP5 that LZ can use when developing and…

PHP cutting problem, please give me some advice, I have been working on it for a day.

PHP cutting problem, please give me some advice, I have been working on it for a day.

I use JCROP to obtain the x, y coordinates, width, and height on the front end, and pass them to uphoto.php for processing. Now everything is normal, but if the width of the picture selected by the front-end user is too large (I use css style to control the maximum width of the picture selected by the user to 680px ), the cropped image is abnormal… I checked some information and it said that it needs to be converted in proportion, but at what proportion? Is the width of the image selected by the user (when greater than 680px) converted to 680? This is uphoto.php: $x1 = $_POST[“x1”];$x2 = $ _POST[“x2”];$y1 = $_POST[“y1”];$y2 = $_POST[“y2”];$targ_w = ​​$_POST[“w”];$targ_h = $_POST[“h”] ;if ($_FILES[“mfile”][“error”]){echo “error: ” . $_FILES[“file”][“error”];}if (!empty($_FILES[“mfile”][ “name”])){ //Extract the file domain content name and determine $path = “/upload/user/photo/”; //Upload path//Check whether the folder exists, if not, create it and give it Highest authority //if(!file_exists($path)){mkdir(“$path”, 0700);}//File formats allowed to be uploaded $allow_type = array(“image/gif”,”image/pjpeg”,” image/jpeg”,”image/png”);//Check whether the uploaded file is of a type that is allowed to be uploaded if(!in_array($_FILES[“mfile”][“type”], $allow_type)){echo “error: The format is wrong, only gif/jpg/png is supported”; exit();}//Detect image size if($_FILES[“mfile”][“size”] > 5*1024*1024){echo “error: file Must not exceed…

[PHP] Code function name problem, please give me some advice

Now I want to do a WeChat development in the template. This template uses code as the function name by default, but when I am doing WeChat development, I need to get the code passed by WeChat GET. There is a conflict between the two codes. Please give me some advice. to deal with. The template uses the daily group purchasing system! Reply to discussion (solution) One is the function name and the other is the variable name? There will be no conflict in this way One is the function name and the other is the variable name? This way there will be no conflict Because when this template is accessed, it is the link xx.xx.com/index.php?mod=subscribe&code=mail subscribe is the name of the controller and code is the method in the controller The URL passed by WeChat is xx.xx.com//index.php?mod=subscribe&code=111111dc2f0cd9cd41f0ebf0f1b225bv&state=STATE code is a variable that comes with WeChat through the URL. Just remember not to have the same name as this variable. For the code=111111dc2f0cd9cd41f0ebf0f1b225bv in the latter URL Obviously the 111111dc2f0cd9cd41f0ebf0f1b225bv method does not exist, and you can easily identify it during scheduling For the code=111111dc2f0cd9cd41f0ebf0f1b225bv in the latter URL Obviously, the 111111dc2f0cd9cd41f0ebf0f1b225bv method does not exist. You can easily identify…

PHP related issues, please give me some advice

PHP problem, please give me some adviceAfter the input is configured, it can be displayed normally by typing localhost, and it can be displayed normally by typing localhost/x.jpg. However, it cannot be displayed on the web page after typing localhost/x.php. Instead, what is displayed is I want to download the x.php file, why is this, I burst into tears ——Solution———– ———The file parsing of php does not take effectThat is, the previous configuration is not normal– —–Solution——————– Discuss How to change it? I followed the configuration in the book. The download is not displayed in the Firefox browser, but the entire code is displayed. DirectoryIndexindex.php index.html index.html.var has this statement, and other configurations have also been done

I just started learning PHP, please give me some advice.

I just started learning PHP, please give me some advice.

I just started to learn PHP, please give me some advice If any seniors have PHP teaching videos or useful e-books, please send them to me. . . [email protected] Thank you ——Solution——————–Just follow the manual and type the examples in Chinese The manual can be downloaded from the official website. Other videos and other videos are all extensions of the manual, remember! Young man, the manual is the way to go….—- –Solution——————–[Details on PHP].Gao Luofeng ——Solution——————–I think the videos on Chuanzhi Blog are pretty good, they are quite detailed and full of content. It is clear, and there is also a help document that LZ can cooperate with php5 when developing and learning. Searching online is all——Solution——- ————-Go and learn PHP100 or LZ——Solution— ——————Sao Nian goes to php100, downloads the free videos and watches them, and then you can basically get started by doing more by yourself… ——Solution– ——————Pull an order to do, set the time, bite the bullet and do it, and the future will be easy——Solution——————– Quote: I think the videos on Chuanzhi Blog are pretty good. They are quite thin, clear and clear. There are also help documents for PHP5 that LZ can use when developing and…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索