Access Control Implementation in Solidity Contracts: Ownable | Roles | AccessControl

OpenZeppelin provides three access control modes for smart contracts: the Ownable contract, the Roles library, and the 3.0 new AccelessControl contract.In this tutorial, we will learn about the differences among the three access control modes and how to use them to enhance the security of Solidity contracts in your own ETAI smart contracts. Le ...

Added by netfrugal on Wed, 06 May 2020 00:12:49 +0300

Mixed query of tp5+Mongodb and Mysql database

Preface MongoDB mass data query is fast without data model Suitable for log database Or the intermediate database reads and stores some business data to be read from the MySQL database MongoDB is not suitable for multi table transaction function, and there is not a good determination mechanism for write operation. It is not suitabl ...

Added by steved on Tue, 05 May 2020 01:46:33 +0300

Thinkphp5.0 paging and skipping

In order to improve user experience when there are many pages, you need to add a skip page, that is, manually enter the number of pages to quickly jump to the specified page. Because it's difficult to write pages manually, and you want to use the pages provided by TP5, but the pages provided by TP5 are relatively simple, so you can customize th ...

Added by sweetstuff2003 on Sat, 02 May 2020 10:12:22 +0300

Simple operation of php and mysql

mysql is a fast, reliable and easy-to-use database system running on the server, which is often combined with php for web development. There are two ways for php to connect to mysql: mysql i ('i 'means improved): only for mysql pdo (php data objects): can be used in many databases mysqli connection mode can be divide ...

Added by hightechredneck on Sat, 02 May 2020 00:52:55 +0300

Cross domain implementation of jsonp+php

Cross domain principle of jsonp There is no cross domain limit for < script > tags The difference between json and json json is a text-based way of data exchange, or a format for describing data. var person = { "name": "test", "age": "25", "sex": "male" }; var data = [1, 2, 3, 4, 5]; jsonp is an unofficial cross domain ...

Added by mcrbids on Fri, 01 May 2020 18:31:35 +0300

LNMP Architecture - Nginx parsing PHP related configuration, Nginx agent

Nginx parsing PHP related configuration configuration file vim /usr/local/nginx/conf/vhost/test.com.conf ......... location ~ \.php$ { include fastcgi_params; //fastcgi_pass 127.0.0.1:9000 fastcgi_pass unix:/tmp/php-fcgi.sock; //There are two listening formats of fastcgi ﹐ pass, ...

Added by phpSensei on Thu, 30 Apr 2020 15:35:29 +0300

Some problem records of laravel+nginx error 500 after configuration have been solved

1, Check the ngxin configuration. Here is my nginx configuration Here paste the source code for your reference: user www www; worker_processes 4; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user ...

Added by a6000000 on Wed, 29 Apr 2020 17:13:02 +0300

PHP7.4 a new way to expand FFI

With PHP 7.4, there is an extension that I think is very useful: PHP FFI (Foreign Function interface), which refers to a description in PHP FFI RFC   For PHP, FFI opens a way to write PHP extensions and bindings to C libraries in pure PHP. Yes, FFI provides high-level languages to call each other directly. For PHP, FFI allows us to call various ...

Added by pgudge on Tue, 28 Apr 2020 15:57:51 +0300

Asymmetric encryption algorithm in PHP

PHP uses asymmetric encryption algorithm (RSA) In the daily design and development, in order to ensure the security of data transmission and data storage, the clear data can be encrypted into complex ciphertext by specific algorithm. At present, the mainstream encryption methods can be roughly divided into one-way encryption and two-way encryp ...

Added by czukoman20 on Tue, 21 Apr 2020 06:17:09 +0300

WeChat generates two-dimensional code, scanning code concern about the official account PHP

Use to wechat interface is“ Generate QR code with parameters ”Two kinds of QR codes can be generated, one is temporary QR code, which will expire with a large amount of generation. It is mainly used in business scenarios such as account binding, where the QR code is not required to be permanently saved; the other is permanent QR cod ...

Added by Riparian on Fri, 17 Apr 2020 19:13:17 +0300