I've always felt it's difficult to build a station, and many times it's not a problem with programming languages, because you can learn the language. But the configuration of the environment is really a hindrance for beginners. When we started
Docker PHP-FPM 7 + Yii 2.0
After Docker pull daocloud.io/php:7.0.2-fpm, Yii
In addition to the mbstring not initialized installation, Imagick is not installed well.
Installation method:1 Download the latest version of the source code from
if (!preg_match_all ("/[". Chr (0XA1). " -". Chr (0xff)." +/", $str, $match))//gb2312 Chinese character alphanumeric underline regular expression"/[". Chr (0XA1). -". Chr (0xff)." +/"The regular of the Chinese gb2312
if (!preg_match_all ("/^[\x{4e0
Reason:
php5.5 later preg_replace no longer supports the E-mode modifier, which can be replaced with the Preg_replace_callback function.
Workaround:
Locate the file Smarty_Compiler.class.php line No. 270:
/* replace special blocks by "{php}"
Public functionGet_lt_rounder_corner($radius){$img= Imagecreatetruecolor($radius* 2,$radius* 2);// Create an image of a square$bgcolor= imagecolorallocate($img,255,255,255);// background of the image$fgcolor= imagecolorallocate($img,0,0,0);Imagefill(
example, PHP generates random strings that can be specified as pure or pure letters or mixed, and can be specified in length.
Generate Random string
function Rand_zifu ($what, $number) {
$string = ";
Shortcut output variables
{: function (...)} Executes the method and outputs the return value
{~function}//execution method does not output
{@var}//Output session variable
{#var}//Output cookie variable
{
In this program, the new class Fenye inherits the class Dbsql, so in the destructor of the new class, the destructor of the parent class is called to link the database, and the file config.inc.php defined by the global variable is included.
Read the source file of a site, and then use regular analysis of its source code, to get all the links
/**********qiushuiwuhen (2002-5-20) ***********/
if (empty ($url)) $url = "http://www.csdn.net/expert/";//Set URL
A simple implementation of the calendar, I do not know this code implementation of the method has no problem, no reference to predecessors, and so you understand my rotten code, and then appreciate the other people's good code, will be more helpful
/** * Goofy 2011-11-29 * Image processing: According to the coordinates passed over the parameters, X,y,w,h, followed by the selected x-coordinate, y-coordinate, W-width, h-height * through the Imagecopy () method to copy the area to the first step
This article introduces the content of my understanding of the plug-in mechanism, and its implementation in PHP, this scheme is only one of the implementation of the plug-in mechanism, for reference only.This article introduces the content of my
!--? php
function Strtojson (str) {
var json = Eval_r (' (' + str + ') ');
return JSON;
}?>
copy code The parentheses on both sides of Str do not forget. Method two, new function form
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service