NumJucks syntax

... NumJucks Syntax 说明 NumJucks is a JavaScript template engine with rich features and simple syntax 1. Variables variables will be obtained from the template context if you want Display a variable as follows { { foo . bar } } 2. Define the template // Define the template < section > ...


Linux Apache application notes - from URL mapping to file system

... DocumentRoot When deciding what file to request for, httpd defaults to the requested URL and the path specified by DocumentRoot . Example: If DocumentRoot is set to /var/www/html and the requested URL is http://www.example.com/fish/guppies.html, the file path is: /var/www/html/fish ...


Thinkphp5 link mongodb

... 1.php open mongodb extension, 官方扩库 http://pecl.php.net/package/mongodb 1. Find the corresponding php version, download the system version, and put the php_mongodb.dll file inside Go to the php environment ext folder. 2. Modify the php configuration file php.ini Add ; php_mongodb...


Hdu 1004 (the basic application of map)

... 问题送门 Ask for the most color of the balloon color. map's basic application, the knowledge used in this question, declaration map<string,int > Ball; a = Ball[ch]; has two functions, first Is to find ch; the second, if there is no ch, it will establish the key of ch, return a value...


The difference between array_merge() and array()+array() of the PHP function.

... In PHP, you can use array_merge function and two arrays to add array+array to merge arrays, but the effect is not the same. Here is the difference between the two. As follows: When the subscript is a numeric value, array_merge() will not overwrite the original value, but array+array...


32-year-old programmer interview, 300 lines of code just finished, HR opened a 15K salary!

... Today, I will share with you a magical example written by a big cow. It is written in JavaScript. I went to find a job and made a 300-line code. I found a 15K job. After reading it, I had to bow down to the public. I also copned the code of Daxie. After running it, I didn't find the BUG...


TP3 VS TP5 difference [personal summary]

... 1. Entry file TP3: http://localhost/index.php/Home/Index/index TP5: http://localhost/public/index.php/index/Index/index Solve the problem of the entry file TP5: http://localhost/index.php/index/Index/index 2. Controller Name TP3: IndexController.class.php TP5: Index.php 3.config.php app...


Ueditor rich text editor cross-domain upload image solution

... In the process of using Baidu rich text editor, if there is a separate image server, you need to put the uploaded image content into the image server, that is, for example The editor of a.com uploads the picture, the picture is saved to the cross-domain upload picture function of img...


LARAVEL custom extended BLADE template command

... We use the more commonly used continue and break as an example, add the following code in the Boot method of the AppServiceProvider class: public function boot() { Blade::directive('continue', function() { return "<?php continue; ?>"; }); Blade::directive('break', function() {...


Call to a member function assign() on null

... Thinkphp: wrote a constructor in the sub-controller, as follows // constructor public function __construct(){ echo 1; } Results page error ----> Call to a Member function assign() on null Then look inside the parent class of inheritance. It turns out that a method of _initialize() is...