Thinkphp5+PHPMailer for sending mail

PHP needs to start the following services to send mail: SMTP: Simple Mail Transfer Protocol for sending mail POP3: Simple mail access protocol, one-way, local mail operations will not be synchronized to the mail server to receive mail IMAP: is a more complex mail access protocol than POP3. It is bidirectional, and local operations on mailboxes ...

Posted by dustbuster on Fri, 03 Apr 2020 07:54:38 -0700

Compiling and installing PHP, LNMP configuration and validation

Compile and install Nginx and Mysql http://blog.csdn.net/qq_36294875/article/details/79352522 [MySQL5.7.11 Compilation and installation] http://blog.csdn.net/qq_36294875/article/details/79344943 [Nginx And simple configuration] Compile installed environment The host is 172.25.23.6 hostname:server6.com K ...

Posted by joeman3429 on Fri, 03 Apr 2020 06:14:47 -0700

YII2 - about file upload

Because the first attempt was fruitless, the new page only wrote the simplest, first look at the following code: First, the View part: (using the partial yii writing method) <form action="<?= Url::to(['default/datafile']) ?>" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <in ...

Posted by dunnsearch on Fri, 03 Apr 2020 03:59:12 -0700

How to upload pictures and post-processing in rich text editor of layui

The front page and JS are as follows: <form class="layui-form" action="" > <textarea name="tweets" id="tweets" style="display: none;"></textarea> <script> layui.use('layedit', function(){ var layedit = layui.layedit; layedit.build('demo'); //Build editor }); </sc ...

Posted by tacojohn on Fri, 03 Apr 2020 03:24:35 -0700

PHP utility code snippet (2)

1. Convert URL: from string to hyperlink If you're developing a forum, a blog, or a regular form submission, you often need users to visit a website. With this function, the URL string can be automatically converted to a hyperlink. function makeClickableLinks($text) { $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)' ...

Posted by jonathanellis on Fri, 03 Apr 2020 00:01:20 -0700

Course assignment - get all campus news

Operation requirements: Take out all the news of a news list page and wrap it into a function. Get the total number of news articles and calculate the total number of pages. Get all news details for all news list pages. Find a topic that you are interested in, do data crawling and word segmentation analysis. Can't be the same as other students ...

Posted by zubinkasad on Thu, 02 Apr 2020 22:18:00 -0700

Encapsulate URL attribute in Eloquent to manage routes in view uniformly

It's not uncommon to have dozens or even hundreds of views in a Laravel application. Soon the route management used in the view will be out of control. Imagine how many of these things you did in the view. <a href="{{ route('users.show', ['id' => $user->id]) }}">{{ $user->name }}</a> If you want to modify the routing name ...

Posted by gewthen on Thu, 02 Apr 2020 18:35:43 -0700

php interprets command line parameters

In php cli mode, you can use $argc and $argv to read all parameters and numbers, such as: ghostwu@ghostwu:~/php/php1/1$ cat go1 #!/usr/bin/php <?php echo 'Number of parameters:' . $argc . PHP_EOL; echo 'Printing parameters:' . PHP_EOL; print_r( $argv ) . PHP_EOL; Add executable permissions to the file: ghostwu@gho ...

Posted by nymall on Thu, 02 Apr 2020 08:06:20 -0700

[zhirentang learning notes] bank card and phone number verification (js)

Bank card verification Luhn formula is a widely used system to verify the identification number. It doubles the value of every other number according to the original identification number. Then add the values of individual numbers together (if the doubled value is 2 numbers, add the two numbers separately). If the sum ...

Posted by ahmed17 on Thu, 02 Apr 2020 06:42:43 -0700

vue+axios+php+mysql to realize dynamic update of front-end interface data

vue implements dynamic data mainly by vue resource and axios. However, vue resource has not been updated since vue 2.0. Therefore, this paper mainly uses axios to operate. 1. Install axios npm install axios --save 2. Writing components in components of Vue cli <span style="font-size:14px;"><template>     <di ...

Posted by killerofet on Thu, 02 Apr 2020 02:44:23 -0700