7. File Upload
You can use PHP to implement the file upload function, note that the client's browser should be more than Netscape3 or more than IE3 version. Also, because this program is related to your PHP configuration file (PHP3 is PHP3.INI,PHP4
Copy CodeThe code is as follows:
Class db{
var $host _addr = "localhost";
var $host _user = "root";
var $host _psw = "123";
var $db _name = "Test";
var $link _id;
var $query _id;
var $numRow;
function DB () {
$this->link_id = @mysql_connect
Regular Expressions in PHP (i)
Hunte April 14, 2000
PHP inherits *nix's consistent tradition and fully supports the processing of regular expressions. Formal expressions provide an advanced, but not intuitive, method for string matching and
Note the table structure used by this program is:
Use test;
CREATE TABLE Image (
ID int unsigned auto_increment primary key,
Description text,
FileName varchar (50),
FileSize int,
filetype varchar (50),
Filedata Longblob
);
*/
? Cmd={read|list|form|
VBulletin HACK
----Show topic size and open new Window on Forum index page
Author: gogosoft
"Show topic Size"
Reason: 1.1. This feature is not available in version 4, and some users use it as a reference for viewing the topic.
Pros: Just add a few
+---------------------------------------------------------------------+
| = This is haohappy read
>
| = Notes in Classes and objects Chapter
| = Translation-based + personal experience
| = Please do not reprint in order to avoid the unnecessary
*
+-------------------------------------------------------------------------------+
| = This is haohappy read
>
| = Notes in Classes and objects Chapter
| = Translation-based + personal experience
| = Please do not reprint in order to avoid the
However, in the case of mixed English and Chinese characters, the following problems can occur:
If there is such a string
$str = "This is a string";
To intercept the first 10 characters of the string, use the
if (strlen ($STR) >10) $str =substr
*
+-------------------------------------------------------------------------------+
| = This is haohappy read
>
| = Notes in Classes and objects Chapter
| = Translation-based + personal experience
| = Please do not reprint in order to avoid the
Building a simple interactive website (vi)
9. Simple Banner Dynamic replacement
I do not know if you have found the major sites on the header ad banner, every time we visit these sites, we will see different advertising icons, or if you refresh
Building a simple interactive website (v)
8. Voting system
In many cases, we need to collect the views of Internet users and netizens. For example: a comparison between a new page and a previous page, a view of something, a prediction of the
WinXP under apache2.052-win32+php4.39-win32+mysql4.022 configuration by
Apache,php4,mysql, can be down on the Internet, here is not to say,
I just did it and I wrote it out for you to share.
(i) Apache configuration
1. Install APACHE_2.0.52-WIN32,
1. Environment: Windows Server 2003 + PHP5 + MySQL 5.1.6.
2. Assuming that the PHP installation directory is d:/php, the MySQL installation directory is d:/mysql.
3. Create a directory WinRAR under d:/php and copy the WinRAR.exe and Rarreg.key from
/**
* Generate random string
*
* generates a random string of a specified length and returns it to the user
*
* @access Public
* @param int $len The number of bits generated by the string
* @return String
*/
function Randstr ($len =6) {
$chars = '
Method has one:
Because the user is added, the user who runs the PHP program must be an administrator (Administrator), and the Safe mode in your php.ini is not turned on, and functions such as system (), exec (), PassThru () are not turned off in
Do not use Ob_start () when turning, add to header file
Write a global variable
Session_Start ();//cannot submit data after adding: Extract ($_post); extract ($_get); extract ($_session);
Session_register (' pt_usr_nm ');//write Browser global
Building a simple interactive website (i)
Many of the features of PHP are related to other software or tools. Using the PHP knowledge we've learned so far, we can try to build a Web site that's simple to interact with. Using this process we can
PHP's basic syntax format and C-like, did not learn C's friends spend a few minutes to see how others write the source code, the basic familiar with the format.
----------------------------------------------------
Get down to the chase.
5 programs
Transfer from blueidea.com
First, Introduction
In any computer device, files are all necessary objects, and in Web programming, the operation of the file has always been a headache for web programmers, and, the operation of the file in the CMS
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