Send a simple example first
Copy Code code as follows:
if (!is_dir (' txt '))//Determine if TXT is a folder directory
{
mkdir (' txt ');//Create a folder directory named txt
$open =fopen (' txt/in.txt ', ' w+ ');//Open file in
Copy Code code as follows:
$password = "1234"; This is the code.
$p = "";
if (Isset ($_cookie["Isview"]) and $_cookie["Isview"] = = $password) {
$isview = true;
}else{
if (Isset ($_post["pwd"])) {
if ($_post["pwd"] = = $password) {
First of all, the structure of our website, because the current site traffic is not very large, but due to the recent company website to promote, so the site from a single switch into the front-end with Nginx do load balancing, drive two Web servers,
Http_get_vars is saved with a Get variable since PHP4.1.0, and the get variables are mainly derived from the following methods
For example, a URL that uses the method of a form to obtain information about the server for instance, a get way. So all
This article illustrates the use of Preg_replace_callback functions in PHP. Share to everyone for your reference, specific as follows:
Mixed Preg_replace_callback (mixed pattern, callback callback, mixed subject [, int limit])
The behavior of this
This article is an example of how PHP transforms text box content into HTML format. Share to everyone for your reference, specific as follows:
Sometimes we're going to use the HTML format for the content that you enter in a multiline text box to
I do not know whether to learn PHP has a future ~ hey more write more boring
The start of Class Createdb//Classes
{
var $db = "localhost";//database address;
var $dbname = "root";//user name;
var $dbpwd = "";//password;
var $dbtable =
Why would you think of using vs2005?
One is to be inspired by vs development. NET application, or asp.net time ... I've always missed it.
Second, VS is a very comprehensive editor, even pictures can directly open the editor, for similar to my work
Building a simple interactive website (vi)
9. Simple Banner Dynamic replacement
I do not know if you have found the major sites on the banner ads banner, each time we visit these sites, will see a different advertising icon, or if you refresh the
A >>
The range () function quickly creates an array of simple methods that populate the array with an integer value of low to high range, and the function returns an array containing all the integers in the secondary range. The form is as follows
To assign a value to a variable's pass address
In PHP 3, variables are always assigned values. PHP 4 provides another way to assign a value to a variable: to send an address assignment. Using a pass address assignment, simply appends a (&) symbol
Building a simple interactive website (iii)
6. Password verification
Maybe you want to put your photo album on your website and just want to show your intimate friends that you need a password verification program.
6.1 Based on HTTP
Customize the routing function, specify the URL to PathInfo, and upgrade the script before
simpleloader.php
$v) {if ($k ==0) continue;
$_server[' path_info '].= '/'. $v; }}//Routing mode public static function router ($rules) {if isset
Objective
In PHP rendered page header information, will contain the version number of PHP information, such as: x-powered-by:php/5.3.3, this is somewhat unsafe, some hackers may be scanning the way to bulk search for a lower version of the PHP
The example in this article describes how PHP implements batch modification of file names. Share to everyone for your reference, specific as follows:
"; for ($i =0; $i ";
$file =basename ($file _name); echo $file. "
";
$dir _arr_
This example for you to share the PHP header function download file implementation code for your reference, the specific content as follows
http://www.php.net/manual/en/function.readfile.php
404 File not found!");
}//Gather relevent info
Objective
Laravel's routing is powerful, the default is defined in the routes.php file, as the project grows larger, we need to define more and more routes, imagine if hundreds of thousands of routes are defined in a file, how to maintain? There
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