/* My program in foreign Srever, my own program to store where, I am very difficult to remember.
So made up a simple directory recursive function, view my program, very convenient.
*/
function tree ($directory)
{
$mydir =dir ($directory);
echo "
"
Character interception to solve the Chinese interception problem
The code is as follows:
function cut_string ($string, $start, $sublen, $extstring = ' ... ', $code = ' UTF-8 ') {//cut_string start if ($code = = ' UTF-8 ') {$p A = "/[\x01-\x7f]|
This is a PHP code that can be specific to hours.
Copy the Code code as follows:
/* Author: Yangyu yangyu@sina.cn */Enter two timestamp, calculate the difference, that is, the number of hours of difference, such as return 2:10, that is, the two
Building a simple interactive website (i)
Many of the features of PHP are related to other software or tools. Using the PHP knowledge we've learned so far, we can try to build a Web site that's simple to interact with. Using this process we can
Implementation of friendly URLs (recommended for vomiting)
You often see other stations of the URL is this it?
Http://www.xxx.com/module/show/action/list/page/7
Or
Http://xx.com/module/show/action/show/id/8.shtml with a name
Dynamic real-time publishing of news programs, you can automatically arrange the display order according to the release time. A news file consists of a text file stored in a specified directory, and when there is news, the program automatically
3. Delete Member Del.php3
Require ("common.php3");
$id =chop ($id);
if (!isset ($id)) error ("Please enter the user ID to delete! ");
ElseIf ($pwd <> $adminpass) error ("Administrator password is wrong! ");
else{
$data =dbmopen ("Class",
The user must then enter in the next file (INDEX3.WML). We ask the user to enter the name of the subject or the professor's surname. You should be aware of how variables are routed between pages. The syntax seems a little complicated, but it lets
The error record appears in the log when compiling and installing PHP:
Virtual Memory Exhausted:cannot Allocate memory
The solution found on php.net, the original link is: https://bugs.php.net/bug.php?id=48809
Workaround: Configure the PHP
In fact, the time to write this code is only nearly three days, not before the detailed thinking and planning (can say a little plan not) that day think of a forum to try, and then do it, and I was only contact with nearly one months of PHP, has not
Include (".. /conn.php ");
$url =$_get[' url '];//url address
$uid =$_get[' uid '];//id value
function Get_center ($url _id, $uid) {
$c//Get content from the cache
$url = $url _id;
$id = $uid;
$c//bar The contents of the cache are assigned to a
Recently encountered a lot about scheduled tasks, to be honest, the PHP script itself also has a two functions can be combined to make a timed task, but the effect is very general, the first choice is the system of task planning, whether it is win
The following PHP error was encountered:parse Error:syntax error, unexpected $end in script.php the line xx after debugging found that the row that produced the error is a row in the middle of the file
$str. = ">\n";
Copy
Check if date is legal
function Check_date ($date) {//check date is legal date
$DATEARR = Explode ("-", $date);
if (is_numeric ($dateArr [0]) && is_numeric ($DATEARR [1]) && is_numeric ($DATEARR [2])) {//Open source
1. Error resolution that cannot be refreshed with the page refresh:
Modify source Code vendor/yiisoft/yii2/captcha/captchavalidator.php
/** * @inheritdoc * * Public functionclientvalidateattribute($object, $attribute, $view)
PHP Get Folder List, file list
/**
* Goofy 2011-11-30
* Getdir () go to the Folder List, GetFile () go to the corresponding folder below the file list, the difference is that there is no "." Suffix file, the others
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