The code is taken from thinkphp:
function Mk_dir ($dir, $mod = 0777)
{
if (!is_dir ($dir) | | mkdir ($DIR, $mod))
{
if (!mk_dir (DirName ($dir, $mod)))
{
return false;
}
}
return mkdir ($dir, $mod);
}
The principle is to try to create
Examples are as follows:
Copy the Code code as follows:
Get TimeNow
$addtime =date ("Ymd", Time ());
creat Dir
$testdir = "./". $addtime. " /";
if (file_exists ($testdir)):
Else
mkdir ($testdir, 0777);
endif
?>
http://www.bkjia.com/PHPjc/
Step one: Go to the Setup window, Windows-Preferences
Step Two: Enter the tab to modify the font. Colors and Fonts, appearance, general
Step three: Select "Text Font" in the "Basic" sub-option.
Fourth step: Click the "Edit" button on the right
This era can not be separated from technical personnel, especially in this network increasingly become a mainstream era of life, network-based technical personnel appear exceptionally eyes, past, present, future, there will always be too many people
The meaning of the session exists, it is estimated that every person used for web development is understood, in order to solve the HTTP is a stateless protocol caused by the problem, not much to say. The main point here is how the server interacts
1.__construct ()
Instantiating an object is called automatically. Call __construct when __construct and a function that has the class name as the function name are present, and the other is called without a back.
The function with the class name as
When we are doing string processing, if the string handler does not implement what we want, we use the regular to help us implement it.
The general use of the regular situation is: matching, find, split, find and replace, we will use these cases in
1: Output META tag:
1, in the PHP MVC controller or the PHP page echo '
;
2. On a PHP page or HTML page
2: Using the header function
Inside the Controller or page header ("content-type:text/html; Charset=utf-8 ");
[code] write a program to sell cut cake"I heard that cut cake has been very hot recently. So, I also want to send a small fortune ... "
View Source
Print?
01
public
class
卖切糕{
02
03
public
static
void
main(String[] args)
throws
Exception{
0
PHP Drawing first to confirm whether the GD library is enabled, to the php.ini file, find Extension=php_gd2.dll will be in front of, remove, restart the server.
If you still do not see the normal picture in the drawing, the server replies to the
Download the corresponding PHP extension file Php_mongo.dll, copy into the PHP extension folder/php/ext, modify the php.ini file, add the following line: Extension=php_mongo.dll PHP operation connection Database $conn = new Mongo
APC (Alternative PHP Cache)
Role: Intermediate code for caching and optimizing PHP
Extension: No additional extensions required
Note: On Windows, APC detects tmp,temp,userprofile these Windows environment variables, and if none of these, checks the
Experienced programmers found that PHP judged the length of the string, using Isset () at a faster speed than strlen () and performing more efficiently.
namely:
Copy CodeThe code is as follows:
$str = ' aaaaaa ';
if (strlen ($STR) > 6)
Vs
if
With the following 4 code examples, what do you think they are creating objects and getting the speed ordering of member variables?
1: Set member variable to public, assign value to member variable by assignment operation, get variable directlyCopy
1. What is a namespace?
A namespace is a special scope that contains an identifier that is under that scope, and is itself an identifier. You can match the namespace to the directory of the operating system. A namespace is equivalent to a directory,
The include () and require (): statements include and run the specified file.
The include () generates a warning and require () causes a fatal error. In other words, if you want to stop processing a page when you encounter a lost file, use require ()
If you do a addslashes () processing of the input data at this point, you must use Stripslashes () to remove the extra backslash when you output it. 2. For PHP Magic_quotes_gpc=off, the input data must be processed using addslashes (), but you do
Workaround: Use JS to the URL of the Chinese character escape code.
When you click the link, the effect is:References: http://127.0.0.1/shop/product_list.php?p_sort=PHP%u5F00%u53D1%u8D44%u6E90%u7F51The result is that the UrlDecode () or
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