Because the first two days a project needs PHP to connect to MySQL, although previously learned, but now basically forgot all about it, but later found a lot of information to find the method:
Php//Set character setsHeader('
Year-old said employment, year-old employment difficult.
Is it difficult to find employment in the IT industry? is PHP developing good jobs?
under the background of slowing economic growth, China's employment situation will be more complicated and
Summary: Through the Development Day report submission system, mastered the basic Phalcon framework principle and the PHP language. Also learned some of the common Linux commands, harvest quite abundant.
here is a summary of the issues encountered
Constant definition
//常量没有$define(“YOU”,"PHP is the best language");const"PHP is the best language";//判断常量是否存在defined(YOU);
Pre-defined constants
PHP kernel-defined constants, using the appropriate module to open
function QuickSort ($array)
{
if (!isset ($array [1])) return $array;
$mid = $array [0]; Gets a keyword for segmentation, typically the first element
$leftArray = Array ();
$rightArray = Array ();
foreach ($array as $v)
{
if ($v > $mid)
$rightArray [
Recently feel a long time no contact LNMP development environment, configuration, etc., resulting in sometimes used when will not be remembered, so configure the environment separately, practice under
I first tasted the trial apt-get install Nginx
Sometimes the object modifies some part of the property to become part of the new object, and we borrow the clone of the prototype to create a new object.
name = $name; $this->age = $age; $this->weight = $weight; }
Learning UI makes me better
Suddenly came to brother Lian has been two months, in this 50 days of learning UI life, there are ups and downs, there are laughter and tears, there are successes and setbacks! It is summed up that in any school, mediocre
directly on the code.
Price + = $this->tax (); $this->price-= $this->sale (); } Taxation protected Function tax () { return 0; } Rent protected abstract function sale ();} Class Book extends
The Foreach loop dynamically adds data to the array, and once in the project, foreach needs to dynamically add data to the array (let's give an example here)
Results:
Hey? Strange, this shows that the Foreach loop can dynamically add data to the
JSONP use environment is usually in the different domain of the login or data exchange when the foreground and background exchange availablePrinciple:The introduction of JS can be different domains, JS files can be generated from the background(It's
Understanding of URLs
Wikipedia gives the answer
URL (full name uniform Resource Locator), and a source locator, a Web address, is the address of the Internet standard resource. To go to any place on the Internet, you need the URL.
First of all we
FORM element name: switch
To invoke the basic format:
API Description:
1. The "type" of the switch must be a switch
2.VALUE Specifies the value when checked, by default 1;uncheck specifies the value when unchecked, the default is 0.
3.ITEMS
/** * Function: Chinese and English mixed string interception (specify start position, intercept length, a Chinese character relative to one character) * parameter: Pass in a String * return value: String */ functioncc_msubstr($str, $length, $start=0
1
# /usr/local/nginx/sbin/nginx
2
/usr/local/nginx/sbin/nginx: error whileloading shared libraries: libpcre.so.1: cannot open shared object file: No such fileor directory
From the error message can be
1.STRSTR (
string,
STR); Determines if there is, or returns a string if it exists
2.stristr (
string,
str); As with 1, the case is different.
3.strpos (
string,
a)!== False//Indicates presence, efficiency
In PHP, the two methods are executed at the end of the request. The method names are register_shutdown_function and Fastcgi_finish_request, respectively. Although the timing is similar, the functionality and application scenarios are different. The
Because the Limit_req traffic limit is set in Nginx configuration, many requests return a 503 error code, in the condition of current limit, in order to improve the user experience, want to return normal code 200, and return the operation frequently
This implementation of PHP exported Excel file using PHP Open source program phpexcel, some key code to share to everyone, the specific content is as follows
array ' id ' =>1001, ' username ' and ' Zhang Fei ', ' password ' = ' 123456 ', ' address
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