How to implement session in php, how to implement session in itself, and how to implement session in laravel

1. How to implement session in php Execute the PHP script, session_start() will read the configuration item from php.ini, and put the generated unique value sessionID save file to the save path and location in the configuration item. And return the response header setCookie through HTTP protocolCookie name = cookie value sent to client. The cli ...

Posted by Mchl on Sat, 02 Nov 2019 03:03:47 -0700

PHP operation Redis, primary PHP can't remember to operate several times

Basic operation methods of redis 1.redis Connections for: //Instantiate redis $redis = new Redis(); //Connect $redis->connect('127.0.0.1', 6379); //Check whether the connection is successful echo "Server is running: " . $redis->ping(); // Output result Server is running: +PONG 2.redis operation Strng (string): // Set the value of ...

Posted by the-hardy-kid on Sat, 02 Nov 2019 00:25:09 -0700

The implementation of Facade in thinkphp

What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([ facade\App::class => App::class, facade ...

Posted by cloudnyn3 on Mon, 21 Oct 2019 20:15:54 -0700

Docker deploys Laravel applications - export PDF using wkhtmltopdf

Let's write about how to use this passage. wkhtmltopdf Export HTML as PDF. I. Installation of fonts WORKDIR /tmp # Installation software RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends wget unzip fontconfig # Install Noto Sans SC font RUN wget https://fonts.google.com/download?family=No ...

Posted by DarkEden on Wed, 09 Oct 2019 07:08:20 -0700

Composer Domestic Acceleration, Modification of Mirror Source

Why slow? Because composer commands are executed by default to obtain specific software information from composer official mirror source abroad, the speed of accessing foreign servers from home is relatively slow without using proxy and turning over the wall. How to Modify Mirror Source You can use the Composer full volume mirrors provided ...

Posted by aladiyat23 on Mon, 07 Oct 2019 01:47:09 -0700

Three Ways of Laravel 5 Operating Database

1. DB facade (original lookup) // query $objectArray=DB::select('select * from student'); foreach ($objectArray as $obj){ echo $obj->id; } // insert $bool=DB::insert('insert into student(name,age) values(?,?)',['tom',18]); // modify $num=DB::update('update student se ...

Posted by jboy6t9 on Mon, 30 Sep 2019 01:06:13 -0700

Create a single-page Vue application from Laravel

The article was forwarded from the professional Laravel developer community with the original link: https://learnku.com/laravel/t... We will continue to build our Vue SPA using Laravel by demonstrating how to load data asynchronously before vue-router enters a route. Before Create a Vue single page application from Laravel (2) The UsersIndex ...

Posted by davinci on Thu, 26 Sep 2019 19:07:27 -0700

How many steps does it take to move from a symfony framework to a complete project?

Preface For PHP frameworks, whether it's yii, symfony or laravel, everyone is involved in their work. For the resource bundles vendor folders, entry files (index.php or app.php) stored in the framework, people also meet with them every day. But are you really familiar with these files/folders? How does a complete project evolve from a pure fram ...

Posted by rurouni on Tue, 24 Sep 2019 01:12:01 -0700

How many steps does it take to move from the symfony framework to a complete project? Dependency injection and reflection

Preface For PHP frameworks, whether it's yii, symfony or laravel, everyone is involved in their work. For the resource bundles vendor folders, entry files (index.php or app.php) stored in the framework, people also meet with them every day. But are you really familiar with these files/folders? How does a complete project evolve from a pure fram ...

Posted by broheem on Tue, 24 Sep 2019 00:04:32 -0700

[Tutorial] Laravel uses JWT-certified Restful API

Articles are forwarded from the professional Laravel developer community with original links: https://learnku.com/laravel/t... In this article, we will learn how to use JWT authentication to build restful API s in Laravel. JWT stands for JSON Web Tokens. We will also use API to create full-featured CRUD applications for user products. API is ...

Posted by Noctule on Thu, 19 Sep 2019 01:21:22 -0700