Starting with PHP 4.2.0, the default value of Register_globals is off, so many variables that can be used directly, such as $PHP _self or set session variables, cannot be accessed in the form of "$ variable name", which can cause a lot of
The legend is Sina PHP engineer pen question
function My_dir ($dir) {
$files =array ();
if (@ $handle =opendir ($dir)) {//note here to add a @, otherwise there will be warning error:)
while (($file =readdir
/*
The following two methods declare access to the same effect
*/
function say () {};
PUBLILC function Say () {};
Copy CodeWhen a member of a class is declared as a public access modifier, that member can be accessed and
How to use: in the site of large-volume pages, the general first page with an IFRAME call the above code can be, such as insertingReprint Address: http://blog.qita.in/?post=327
Many times, we need to use the time to generate HTML page
Ignore_user_abort (); PHP scripts can continue to execute even if the client disconnects (such as turning off the browser).
Set_time_limit (0); Execution time is unlimited, php default execution time is 30 seconds, through Set_time_limit (0)
Reprint Address: http://blog.qita.in/?post=275 How to use:Require_once (' 360.php ');
Http://blog.qita.in
function Customerror ($errno, $errstr, $errfile, $errline)
{
echo "Error number: [$errno],error on line
PHP Open CSV file
Set UTF-8 encoding
SetLocale (Lc_all, ' en_US. UTF-8 ');
CSV path
$csv _file = "Csv/excel.csv";
Open a file as read-only
$handle = fopen ($csv _file, "R");
To define an array of
Extract Discuz installation Progress display, such as what what data sheet creation is complete, what file creation is complete! Yesterday, a classmate asked http://www.oschina.net/question/13403_74988, took a little time to extract the discuz.At
Database Operations Classes
Class db
{
Data saving variables after SQL execution;
var $db;
Read or set the current data location
var $position = 0;
Executes the SQL statement and saves the result as a DB variable;
Illegal characters to filter on
$ArrFiltrate =array ("'", ";", "union");
The URL to jump after the error, without filling the default previous page
$STRGOURL = "";
Whether the values in the array exist
function
Two-dimensional arrays eliminate duplicate values
function ARRAY_UNIQUE_FB ($array 2D) {
foreach ($array 2D as $v) {
$v = Join (",", $v); Dimension, you can also convert one-dimensional array to a comma-concatenated string using
XML-to-array, including the root key, ignoring empty elements and attributes, with significant errors
function Xml_to_array ($xml)
{
$reg = "/]*?> ([\\x00-\\xff]*?) /";
if (Preg_match_all ($reg, $xml, $matches))
{
Over the last few months, I've been learning how to build iOS apps with Objective-c, and I'm finally getting a little bit of a go today. Have to sigh, this is more difficult than I thought. Tangled, confused, frustrated, the actual time to write
Communication between people is now mostly done through instant messaging, and these tools have the basic function of file transfer. Then use this function after two development by using Instant Messenger, the following is an example of the Anychat
!--? php
$pic = ' abc.3434.342.12123.123.exe ';
$pics = Explode ('. ', $pic);
/* Get the total number of arrays and take the last */
echo $num = count ($pics);
echo ' '. $pics
A good programmer is the kind of person who has to look both ways, even if it's a one-way street. --doug Linder as a PHP programmer in the IT industry, the motivation that drives me to work every day is fun and passion for programming. But in order
recently, there is a need for work, need to get Http://weibo.com/at/weibo data, is @ my own data, no interface, only by scratching the page. Put some code below.From: http://summerbluet.com/704
/**
* Used to simulate Sina
PHP 4.3 or above needed
Define ("Brief_length", 800); Word amount of the Briefing of an article
function Generate_brief ($text) {
Global $Briefing _length;
if (strlen ($text)
$Foremost = substr ($text, 0, brief_length);
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