This article mainly introduces PHP to get the current execution of the PHP file name code, the need for friends can refer to the next day to write the wall when the navigation judgment encountered this problem. My solution is this: judge the current PHP file name to determine which block of the navigation bar is highlighted. How does php get the current URL file name? I deal with this: shock: The tutorial is definitely to get the current page URL, where we use PHP's $_server[' php_self '] to get the Web page address assumes the URL is http://www.php.cn/$php _self= $_ server[' php_self ']; Get Web address//output result: http://www.php.cn/output, we only need to index.php, the front of a large bunch of things are useless. What do we do? Here we use the substr () function. SUBSTR () is used to return a part of a string: substr syntax substr (s
1. PHP Gets the code example that currently executes the PHP file name
Introduction: This article mainly introduces PHP to get the current execution of PHP file name code, the need for friends can refer to the following
2. PHP generate static HTML page simple method HTML code HTML5 tutorial HTML space
Brief: html:php generate static HTML page simple method: PHP file name: dome.php<?php$string = 1;ob_start (); @readfile ("templets/list.html"); $text = OB _get_flush (); $myfile = fopen ("list.html", "W"), $text = Str_replace ("{counent}", $string, $text); Fwrite ($myfile, $text)
3. php File upload Chinese garbled what to do, PHP file name Chinese garbled problem
Introduction: PHP File upload Chinese garbled how to do, PHP filename Chinese garbled problem
4. Common PHP System Constants Summary _php Tutorial
Introduction: Common PHP System constants summary. Some common PHP system constants are as follows: __file__ current PHP file name __line__ The number of rows currently in PHP __function__ the currently executing function __class__ the currently executing class P
5. PHP filename and file Content Finder Instance _php tutorial
Introduction: PHP file names and files content Finder instances. Searching for files is simple as long as the user enters the directory, we will automatically traverse the directory to find the associated file name, and let's take a look at it. PHP file Finder, enter a
6. Android via PHP connect Baidu Cloud Database _php Tutorial
Introduction: Android via PHP connection Baidu Cloud database. Android through the PHP connection Baidu Cloud database to use PHP to the Baidu Cloud database operation, all must first through the PHP file to connect to the Baidu Cloud, the connection cloud database PHP file name is conn, inside
7. PHP generation static HTML Page The simplest method example, static simplest _php tutorial
Summary: The simplest example of a static HTML page generated by PHP is static and minimalist. PHP generates static HTML page The simplest method example, static simplest PHP file name: dome.php copy code code as follows: PHP $string = 1; Ob_start (); @readfile ("templets/list.html"); $text
8. PHP Learning Note 5-Class inheritance/method rewriting, Learning notes 5-_php Tutorial
Introduction: PHP Learning Note 5-Class inheritance/method rewriting, learning note 5-. PHP Learning Note 5-Class inheritance/method rewrite, learning note 5-change man.php file name people.php, add code: 1 public Function Hi () {2 return $this-_name. ' Say hi '; 3} NEW
9. Does the PHP file name and the class name include no effect?
Introduction: File Name: The original validationcode.php modified to validate.php after the verification code can be displayed normally, the browser request code.php file in the display verification code {code ...} code.php {code ...}
10. After configuring Wamp, the browser enters the default php file name to download the document directly
Summary: After configuring Wamp, the browser enters the default php file name to download the document directly
"Related question and answer recommendation":
Does the PHP file name and the class name include no effect?