- In PHP, the name of the current script (not including the path and query string) is recorded in the predefined variable (1), while the URL linked to the current page is recorded in the predefined variable (2).
echo $_server[' php_self ']; echo $_server["Http_referer"];
- The execution program segment outputs (3).
0
- In HTTP 1.0, the meaning of status code 401 is (4); If you return a prompt for "file not found", the header function is available with the statement (5).
(4) Unauthorized (5) header ("http/1.0 404 Not Found");
- The function of array functions Arsort is (6); the function of statement error_reporting (2047) is (7).
(6) Reverse order and maintain index relationship (7) all errors and warnings
- The database connection string format in Pear is (8).
- Write a regular expression that js/vbs all the scripts on the Web page (that is, remove the tags and their contents): (9).
/<[^>].*?>.*?<\/>/si
- To install PHP as an Apache module, the first thing to do is to dynamically load the PHP module with a statement (10) in the file http.conf, and then use the statement (11) to make Apache file All files with PHP extensions as PHP scripts.
(Ten) LoadModule php5_module "D:/xampp/apache/bin/php5apache2.dll" (one) AddType application/x-httpd-php-source. Phps AddType application/x-httpd-php. php. php5. PhP4. php3. phtml
- Both the statement include and the require can include another file in the current file, with the difference being (12); To avoid including the same file multiple times, you can replace them with statements (13).
(12) When an exception occurs, the include generates a warning require a fatal error (require_once ()/include_once ()
- The properties of the class can be serialized and saved to the session so that the entire class can be restored later, and the function to be used is (14).
Serialize ()/unserialize ()
- A function's argument cannot be a reference to a variable unless (15) is set to on in PHP.ini.
Allow_call_time_pass_reference
- The meaning of the left join in SQL is (16). If Tbl_user records the student's name (name) and school number (ID), Tbl_score records the student (ID) and test score (score) and the test subject (subject), which were expelled from the student's exams, without their records. To print out each student's name and the corresponding total, the SQL statement (17) can be used.
(16) Natural left outer connection (+) select Name, Count (score) as Sum_score from Tbl_user to join Tbl_score on Tbl_user.id=tbl_score.id Gro Up by Tbl_user.id
- In PHP, Heredoc is a special string, and its end flag must be (18).
The line where the end identifier is located cannot contain any other characters except ";"
- Write a function that can traverse all the files and subfolders under a folder.
/*** traversal of the directory, the result is stored in an array. Support PHP4 and above. PHP5 can replace the while loop with the Scandir () function later. * @param string $dir * @return Array*/my_scandir ($dir) { $files = array (); if ($handle = Opendir ($dir)) {while (($file = Readdir ($handle))!== false) { if ($file! = ":" & & $file! = ".") { if (Is_dir ($dir. "/" . $file) { $files [$file] = Rec_scandir ($dir. "/" . $file); } else { $files [] = $file;}} } Closedir ($handle); return $files;
- The realization principle of infinite classification in the forum is briefly introduced.
- Design a Web page that pops up a full-screen window with a text box and a button open. The user clicks the button to close the window while entering the information in the text box, and the input information is displayed on the main page.
http://www.bkjia.com/PHPjc/752569.html www.bkjia.com true http://www.bkjia.com/PHPjc/752569.html techarticle In PHP, the name of the current script (not including the path and query string) is recorded in the predefined variable (1), while the URL linked to the current page is recorded in the predefined variable (2). Ech ...