Php simulates the autoindex effect on the server.
Can be thrown to the background to facilitate reading the code?
// File Browser
Error_reporting (0 );
$ Pwd = empty ($ _ GET ['dir'])? './': $ _ GET ['dir'];
$
Write files in high concurrency
Function write ($ data ){
$ Return = false;
If ($ handle = @fopen('error.txt ', 'A + ')){
$ I = 0;
While (! Flock ($ handle, 2) & $ I ++
Usleep (500000 );
How to obtain the maximum number of occurrences of a character in a string
Reprint address: http://blog.qita.in /? Posting = 467
$ Str = "asdfgfdas323344 ##\ \ $ fdsdfg * $ ** $ 443563536254fas"; // any length string
//
Programmers should learn about code compilers.
All excellent computer science schools offer compiler courses, but a relatively small number of schools take it as a required part of the undergraduate course. This article answers this
Open a CSV file in PHP
Open a CSV file in PHP
// Set UTF-8 encoding
Setlocale (LC_ALL, 'en _ US.UTF-8 ');
// Csv path
$ Csv_file = "csv/excel.csv ";
// Open the file in read-only mode
$ Handle =
PHP records error logs by day
File 1: [error. class. php: rewrite error processing. there will be two times for file-type log output. The first is Greenwich mean time, the second is Beijing time, and the following is an error message, you
Function for traversing all files and subfolders in a folder
The legend is that Sina php engineers wrote questions
Function my_dir ($ dir ){
$ Files = array ();
If (@ $ handle = opendir ($ dir) {// note that you
Binary Tree function implementation (JAVA)
It mainly implements the common usage of binary trees and may cause some errors. I hope to correct them.
Package structure. tree;
Public class Node {
Public int
No message board supported by the database
A simple message board without database support is mainly used to store files and read data.
/**
* This is a message board system that does not support databases on a single
Research on small relative paths
For example, find the relative path of the two paths and make a brick!
/**
* Find the relative path of the two paths
* @ Param string $ patha path
* @ Param string $ pathb path B
Replace the nth occurrence character in the string without a regular expression.
For example, there is a string: $ a = 'Hello world hello pig hello cat hello dog hello small boys ';Then we want to change the 3rd hello appearance to good-
Do you have any programmers who want to start a business? Cooperation not
I am dedicated to promotion. I am dedicated to domestic and foreign websites. I am mainly selling my own products in China, and I am mainly doing overseas
Show hidden webpage content expand hide page effect
Webpage Resource Code site prompt: test to show hidden webpage content expand hide page special effects this code looks at the effect-it is necessary to
Example of the Singleton mode implemented by php
/****------------------*******
* Copyright (C) 2007 by Yan Hongfei *
* Ghf@localhost.localdomain *
**
* This program is free software; you can
A good string truncation function (one Chinese character is counted as two characters, and one English character is counted as one character)
'*************************************** ***********
'Function name:
One paging function: displays "previous page" and so on.
'*************************************** ***********
'Function name: ShowPage
'Usage: displays "previous page" and other information
A small function that inserts a string at a specified position.
Insert a small string function at the specified position of the string:
The above is the content of the small function that inserts a string at the specified position of the
How can programmers maintain their technical advantages in the face of new rhetoric and job-hopping?
How long does the programmer's knowledge have a half-life? It is often said that it is five years. In other words, half of the programming
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