20.16-17 functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.Format: function F_name () {Command}The function has to
Every time PHP exports a csv value, the end of the number is E + a number. {Code...} How can PHP reverse the float string to the original value? {Code...} Every time PHP exports a csv file, the end of the number is E +.
$ S = 152656464646333356522
Because the URL is uncertain, You need to determine whether the url exists (whether it times out). below is the self-written {code ...} baidu hasn't found the corresponding example for half a day. Because the URL is uncertain, You need to determine
Install smarty
Download http://www.smarty.net
Smartycompressed package smarty-3.1.4.zip
Decompress the package to the specified directory smarty-3.1.4.
Cut the libs Folder: smarty. Class. php
3. Understand core files of smarty
Smarty: High
When I checked the uchome source code yesterday, I found that urlencode was used in some places, and rawurlencode was used in some places. The difference between the two methods is not very clear.CodeTo test.
Save the following code to a PHP file:
Ec (2); 1. boolean value: false (0, blank, null); & nbsp; true (-1, non-0 value ); 2. The echo $ s output content is $ s; & nbsp; If & quot; contains $ s or {$ s}, then the value of the variable will be displayed. {$ S} is recommended. & Nbsp; Use &
Curl crawling times out. when curl is used to crawl other websites, it can be captured normally.
Reply to discussion (solution)
Amitabha, Shi zhu. if the basic programming cannot be solved, it will also be sent here.
Set_time_limit (0 );
Batch modify Linux server password, generate EXECL table at the same time
Copy the Code code as follows:
#!/usr/bin/env python
#coding: UTF8
#随机生成自定义长度密码
From random import choice
Import String,pickle
def genpassword
Bash should be the most popular shell scripting interpreter on Linux today (and a shell called dash, I hate this stuff too much.) As long as you work on Linux and want to work more happily, you should be familiar with the most basic bash programming,
{Code ...} $ snewa (); echos: config-& amp; gt; id; die; how to make s: $ config-& amp; gt; you can automatically complete the IDs and status .....
class a{ static $config = [ 'id' => 1, 'status' => ['status1'=>1,'status2'=>2] ];
PHP class variables and members, and issues to be aware of during inheritance, access, and rewriting
Class Myclass {
Public $ prop = 123;
}
$ Obj = new Myclass ();
?>
The member
test (); Require ("./ren.class.php"); Require_once ("./ren.class.php"); Require_once "./ren.class.php"; $f = new Ren (); $f->test ();
Automatically load class//1. All class filenames and class names should be consistent//2. All class files are
class a{ static $config = [ 'id' => 1, 'status' => ['status1'=>1,'status2'=>2] ]; }
$s = new A ();Echo s::config->id;Die
How to make S:: $config can automatically fill out the ID and status .....
Reply content:
class a{
Serialization is the process of converting a variable to a saved or transmitted string. deserialization is to convert the string to the original variable when appropriate. These two processes can be combined to easily store and transmit data, making
Overloading in PHP differs from traditional object-oriented overrides, such as in Java:
class A{ public void methodName(参数1); public void methodName(参数1,参数2); public void methodName(参数1,参数2,参数3); ...}
Overloading in PHP is an "elegant"
: This article mainly introduces php learning 00. if you are interested in the PHP Tutorial, you can refer to it.
Global variables, Subscript isGlobal variablesName, which can also be used inside the function. you can use this array to directly
Php variable Getting Started Tutorial, php variable basics
$ A = 'hello ';
Function test (){
Var_dump ($ );
}
// Test ();
Include 'B. Inc ';
B. inc content:
Echo
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.