--
--Database: ' Db_copy_old '
--
--
--The structure of the table ' article '
--
CREATE TABLE IF not EXISTS ' article ' (
' ID ' int (a) is not NULL auto_increment,
' title ' text character set
An example of the function of collecting picture in PHP
if ($url = = ") {return false;} $ext = STRRCHR ($url, '. '); if ($ext! = '. gif ' && $ext! = '. jpg ') {return false;} //Determine if!is_dir exists ($f Ilepath)? mkdir ($filepath): null;
$fp = Fsockopen ("www.baidu.com", $errno, $errstr, 30);
if ($fp) {
This is where the request is set to head.
$out = "Head/img/baidu_sylogo1.gif http/1.1\r\n";
$out. = "host:www.baidu.com\r\n";
$out. =
$users = Array (
Array (' name ' = ' Tom ', ' age ' = 20)
, Array (' name ' = ' Anny ', ' age ' = 18)
, Array (' name ' = ' Jack ', ' age ' = 22)
);
Copy CodeI want to be able to sort by age from small
$var 1 = ' nameofvariable ';
$nameOfVariable = ' This is the value I want! ';
echo $ $var 1;
?>
Copy CodeOutput Result:This is the value I want!Articles you may be interested in:PHP variable variable security examples of PHP
/*
Traverse the folder; Function: (a) can delete the file (b) editable text, Web page file (c) can delete the folder, if the folder is empty (d) can establish files, folders, modify the folder name;
*/
$path = $DOCUMENT _root;
$file = fopen (' windows_2011_s.csv ', ' R ');
while ($data = Fgetcsv ($file)) {//reads a row of CSV each time
Print_r ($data); This is an array, to get every data, access the array subscript can
$goods _list[] = $data;
}
A small example of a php date function-bbs.it-home.org
echo time ();//output from January 1, 1970 0:0 0 seconds to the current time (timestamp)
echo "";
echo Mktime (23,56,59,12,20,1999);//output timestamp of the
/**
* php File Upload
* 2013-11-30
*/
if ($_post[sub]) {
if (Is_uploaded_file ($_files[file][tmp_name])) {//Determine whether to take the temporary file and save inside PHP. A return value of 1 is true.
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