(1) Under Project. Env is the file for the configuration database
Db_host=127.0.0.1db_database=blogdb_prefix=blog_db_username=rootdb_password=123.comg
Write to database server address, connected database name, table prefix, user name, password,
Problem
Want to know if a string contains a specific substring. For example, want to see if an email address contains an @.
Solve
if (Strpos ($_post[' email '), ' @ ') = = = False) { echo ' there is no @ in the e-mail address! ';}
Discuss
We first prepare the MySQL data table, assuming that the project has a record of student information table student, and there are id,name,sex,age to record the student's name, gender, age and other information.
CREATE TABLE ' student ' ( ' id '
After introducing the basic concepts in yii, we now explain the general development process for developing Web applications using YII. The development process here assumes that we have completed the requirements analysis of the application and the
A controller is an instance of Ccontroller or its subclasses. It is created by the app when the user requests it. When a controller is running, it performs the requested action, and the action usually introduces the necessary model and renders the
Internationalization (Translator Note: internationalization, because the word I and N has 18 letters, so often abbreviated as i18n) refers to the process of designing an application software, which can adapt to different language and regional needs
We usually use a 32-bit JVM (64-bit JVM will lose 10-20% performance, usually not recommended), and the 32-bit program should be 4GB to address space, why the JVM memory on Linux only use 2GB?
After communicating with the JDK development team, we
First, let me introduce you to the multiple property of file in HTML5
Definition and usage
The Multiple property specifies that the input field can select multiple values. If you use this property, the field can accept multiple values.
Instance:
In this paper, we analyze the solution to the problem of Chinese garbled error in PHP version of public platform. Share to everyone for your reference, as follows:
Public flat development encountered in reply Chinese garbled, this problem small
Here is the text of the article:
Basic concepts
OO programming (Object Oriented programming, OOP, object-oriented programming) is a computer programming architecture. One of the basic tenets of OOP is that a computer program is composed of a single
The following is the original description in php.ini and the default configuration:
; Open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes more sense if used in a per-directory or
;
Asynchronous drag-and-drop file upload-small instance
Upload.html
todo supply a TITLE & lt;style> #box {width:150px;height:150px;border:1px solid red; } Please drag in the uploaded file
upload.php
Xmlhttpreuest.js
function
This article describes the PHP common string output method. Share to everyone for reference, specifically as follows:
1. Echo Usage: Use echo to output directly or echo () output, no return value
$string = " bold display text ", Echo $string;//echo
One, shared memory
Shared memory is the most efficient way to communicate, because there is no need for a process to be copied to the kernel and another process to read in the kernel.
Second, ipcs-m View shared memory
Ipcrm-m Deleting shared memory
Types in PHP
This chapter highlights
Learn about the eight types of PHP ... Boolean,
NULL, String, array, object, and resource
Create, read, display output and manipulate different types of objects
Convert from some type to other type
All
4. How do I abstract a class?
As described above, object-oriented programs are objects, but objects are instantiated by class, so
The first thing we need to do is to declare the class, it is easy to make a class, as long as you master the Basic
In the use of PHP to develop Web applications, many applications will require users to register, and the registration of the time we need to deal with the user's information, the most common is the mailbox and password, this article is intended to
Now say the array
There are 3 types of PHP arrays
Array of numeric array with numeric ID key
Each ID key in an associative array array is associated with a value
A multidimensional array that contains one or more arrays
About the declaration of an
If a method needs to accept a callback method as a parameter, we can write
Output:
Do STH callback
But we are not sure whether the callback method can be called, so there is a lot of extra work to be done to check whether this callback method
PHP in two-dimensional array ordering, you can use the PHP built-in function Uasort ()
Example one:
Use a user-defined comparison function to sort the values in the array and keep the index associated
The callback function is as follows: Note that
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