建立一个新仓库,为了避免错误,直接创建 .gitignore, README.md等文件。 Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.
打开终端。Open Terminal.
转换到想要上传的项目目录。Change the current working directory to your local project.
git 初始化。… Read More
项目地址:https://github.com/mistic100/RandomColor.php
下载 JS:randomColor.js
下载 PHP:RandomColor.php
Random Color
Options
You can pass an options object to influence the type of color it produces. The options object accepts the following properties:
hue – 控制颜色的色调,你可以输入色彩的颜色名称,例如:red, orange, yellow, green, blue, purple, pink 和 mono… Read More
MySQL: ERROR 1040: Too many connections
This basically tells that MySQL handles the maximum number of connections simultaneously and by default it handles 100 connections simultaneously.
These following reasons cause MySQL to run out connections.
Slow Queries
Data Storage Techniques
Bad MySQL configuration
I was able to overcome this issue… Read More
1. Bigcommerce API Client
PHP client for connecting to the Bigcommerce V2 REST API.
To find out more, visit the official documentation website: http://developer.bigcommerce.com/
项目地址:https://github.com/bigcommerce/bigcommerce-api-php
下载:https://github.com/bigcommerce/bigcommerce-api-php/archive/master.zip
克隆:https://github… Read More
phpmyadmin报错:
Some errors have been detected on the server! Please look at the bottom of this window.
[Ignore All] [Ignore]
This is the output when [users] table has been clicked: (but it shows the records at the top) this is found at the bottom===>
`Notice in ./libraries/dbi/DBIMysqli.class.php#522
Undefined offset: 245
Backtrace
./libraries/Dat… Read More
发现phpmyadmin默认是latin字符编码,导致某些特殊字符,或者乱码字符无法保存,常有的报错类似:
Mysql2::Error: Incorrect string value: '\xE2\x80\xA8\x09
1. 那么首先看一下我们的mysql默认字符是什么:
sudo mysql
mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.45, for Win32 (ia32)
Connection id: 25
Current database: spiel0
Current user: root@localhost
SSL:
Open SSH
First Install CURL by typing sudo apt-get install curl
Then Restart Apache by typing sudo service apache2 restart
Then Install PHP5 CURL by typing sudo apt-get install php5-curl
如果您使用的是7.0版块,可以尝试 sudo apt-get install php7.0-curl
Then Restart Apache by typing sudo service apache2 restart
Done!
更多可以参考:https://stackoverflow.com/ques… Read More
In order to add a redirect function to your WordPress template, you should perform the following:
Log into your Dashboard and go to Appearance -> Editor, select Home Page Page Template (page-home.php):
If you don’t have the Home Page page template in your theme folder, you should copy it there. To do that, you need to copy the file page-home… Read More
I have strings like,
$a = 'helloMister';
$b = 'doggyWaltz';
$c = 'bumWipe';
$d = 'pinkNips';
How can I explode at the capital letters, search on google for some time and came back with nothing!
Thanks.
解决:
If you want to split helloMister into hello and Mister you can use preg_split to split the string at a point just before the uppercase letter
There is the DatePeriod class.
EXAMPLE:
$begin = new DateTime('2013-02-01');
$end = new DateTime('2013-02-13');
$daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);
foreach($daterange as $date){
echo $date->format("Y-m-d") . "<br>";
}
(P1D stands for period of one day, see DateInterval for further documentation)
$pe… Read More