First, get the length of the folder that contains the current file, and then use substr to intercept the length:
Copy Code code as follows:
$dirName = Str_replace ("\", "/", DirName (__file__));
$dirNameLength = strlen ($dirName);
This article analyzes the usage of spl_autoload_register () function in PHP. Share to everyone for your reference, specific as follows:
Let's look at another function before you know this function: __autoload.
First, __autoload
This is an auto
Time () in PHP is to get a number that indicates how many seconds have gone from 1970-01-01 to now, it's strange
But this is convenient to calculate,
To find out the day before is time () -60*60*24;
To find out the time of the previous year is
Definitions and Usage
The Str_replace () function replaces some other characters in a string with a string.
GrammarStr_replace (Find,replace,string,count)
Parameter description
Find required. Specify the value to find.
Replace Required. Specify
20 hours to read the goal of the station, you can modify their own, see how to get other stations, very simple.
chuanqi.php//Thieves
Copy Code code as follows:
?
Extract ($_get); extract ($_post);
$clinchurl = "http://www.haosf.com";
So how does the function of this random celebrity quote be achieved?
In fact, it is very simple, only need a string variable, which put all the random to show the famous quotes, and then use the explode function to decompose the number of groups,
A more good PHP calendar code
Copy Code code as follows:
/**
* Calendar
*
* Copyright (c) 2007 by Chen Yixin (Deep Space). All rights reserved
* To contacts the author write to {@link mailto:shenkong@php.net}
* @author Chen Yixin
You can use->, and if an object's properties contain an object, you can get the properties of the inner object using two-> operators. You can even place these expressions with a string of double references. In the following example, the property
Preg_match_all function:int Preg_match_all (string pattern, string subject, array matches [, int flags]) performs a global regular expression matchSearches in subject for all occurrences of the regular expression matched with pattern and places the
Command line mode, the different controllers are invoked according to the arguments. The specified method is executed periodically in the controller according to the configuration
application.php
$v) {if ($k ==0) continue;
$_server['
This article describes the PHP common string output method. Share to all of you for reference, specific as follows:
1. Echo Usage: Can be directly output with ECHO, or echo () output, no return value
$string = " bold display text ";
echo
PHP and XML: Using the Expat function (ii)
Let's take a look at the PHP code that actually handles this document.
/*newsboy:news system for the web written in PHP by Justin Grant (Web:jusgrant.cjb.net or Justin.host.za.net mail:just
This example for you to share the PHP simulation post upload pictures of the specific code for your reference, the specific contents are as follows
Both the server and the client are PHP languagesBut the client is not a Web page, not running on the
There's not much technical content here, I just talked about it quite simply. (The following operations, such as no specific description, are based on php+mysql+apache situation) in the current various hackers rampant, how to achieve their own PHP
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