The Fastest and Easiest Way to Build Your Own Git Server
Gogs is a self-service Git service that is extremely easy to set up. The goal of Gogs is to create the simplest, fastest and easiest way to build a self-service Git service. Developed in the Go language, Gogs can be distributed as a standalone binary and supports the Go language's support for...
Free Code Editor Integrated Development Tools (IDE) - Lightly
Lightly, make writing code easier Lightly for you to automatically build the development environment, to provide excellent IDE programming experience, support for client & Cloud IDE two modes, your project can be stored in the cloud in real time, you can collaborate with friends to develop or share the project!
5 Ways PHP Determines Whether or Not It's Null
1. isset function: to determine whether the variable is initialized Description: it does not determine whether the variable is empty, it can be used to determine whether the elements of the array have been defined. Note: When using isset to determine whether an array element has been initialized, it is more efficient than array_key_exists ...
PHP checks if the number is a plain number
The first: directly use a function, is_numeric() This function is to detect whether the parameter is a number, if so, return true, if not, return false, for example: is\_numeric( 'abcd123' ) ordie('the provided parameter is not a number'); The second ...
PHP common variable string checksum rules
1, check cell phone number /** * Determine whether the phone format is correct * @param $mobile */ function is_mobile($mobile) { return preg_match('/1[3456789]{1}\d{9}$/',$mobile); } /** * Verify the format of the cell phone * @param $utfstr...
Cell phone type access judgment
1. determine if it is mobile access ** * determine if it is mobile access * @return boolean */ function cmf_is_mobile() { if (PHP_SAPI ! = 'cli') { static $cmf_is_mobile; if (isset($cmf_is_mobile)) return $cmf...
Codec conversion of string character sets
String codec conversion including: utf8 to gbk, Simplified Chinese to Traditional Chinese, unicode to utf8, Ascii to Pinyin, Unicode decoding, etc.
PHP common string processing methods
1, realize the search engine to search results hit the keyword marked red <?php /** * Split the string into an array * @param $search search keyword * @return array */ function splitString(string $search):array { // positive ...
PHP common methods to manipulate directories or files
1, convert \ to / /** * Convert \ to / * * * @param string $path path * @return string path */ function dir_path($path) { $path = str_replace('\\', '/', $path); if(substr($path, -1) ! = '/'...
php session vs cookie
1, set session /** * set session * @param String $name session name * @param Mixed $data session data * @param Int $expire timeout(sec) */ function set _session($name, $data, $expir...
PHP CURL operations
The CURL class implements a wrapper around the PHP Curl extension, using instances of this class to enable remote access. To use this module you need to enable the Curl extension. 1, initiate get request function get_url($url) { $ch = curl_init(); $header[] = ''; curl_setop...
PHP Date, Time, Byte Conversion
1, convert bytes to other units (Gb, Mb, etc.) 2, time conversion (convert seconds to time) /** * Function dataformat * Time conversion (convert seconds to time) * @param $n INT time */ function dataformat($n) { $hours = f ...













