PHPsu新闻
MANUAL ZH  |  EN
     


MVC model to achieve the PHP
MVC model in the framework of the site are very common. It allows us to establish a three-tier structure of the application, isolated from the code-useful to help designers and developers work together and maintain and enhance our ability to expand e...
Author:Time:2008-06-05 15:57:08 Hits:4 Comment:0 View Article...
PHP for the use of encryption and decryption
?php $key = This is supposed to be a secret key !!!; function keyED($txt,$encrypt_key) { $encrypt_key = md5($encrypt_key); $ctr=0; $tmp = ; for ($i=0;$istrlen($txt);$i++) { if ($ctr==strlen($encrypt_key)) $ctr=0; $tmp.= substr($txt,$i,1) ^ substr($en...
Author:Time:2008-06-04 19:03:55 Hits:14 Comment:0 View Article...
PHP security rules
Rule 1: Never trust external data or enter On the Web application security, we must recognize that the first thing should not be trusted external data. The external (outside data) is not included in the PHP code by the programmer in the direct input...
Author:Time:2008-06-03 00:09:07 Hits:12 Comment:0 View Article...
PHP Conditionals (if statements)
Probably in every PHP script, you will use conditionals, from if statements to switch statements they are everywhere, let's get right into it and start you off with a simple if statement, probably the most used conditional. PHP: ?php if ( 1 == 1 ) {...
Author:Time:2008-06-02 21:55:57 Hits:6 Comment:0 View Article...
Use ob_start()
Put ob_start() at the beginning of your script before everything else. ?php ob_start(); // the rest of your script ? This will save you lots of time when you get advanced enough to do redirection or understand what it does. The syntax for browser re...
Author:Time:2008-06-02 21:54:56 Hits:4 Comment:0 View Article...
Template, PHPLIB approach
If you know what is a template is now trying, first of all to look at the best of Sascha Schumann wrote the article template - Why and how to use them in PHP3 in (Templates - why and how to use them in PHP3) in the preceding paragraphs. Generally spe...
Author:Time:2008-06-01 23:18:44 Hits:2 Comment:0 View Article...
perform arithmetic operations on variables
If variables are the building blocks of a programming language, operators are the glue that let you build something useful with them. You've already seen one example of an operator - the assignment operator -, which lets you assign a value to a vari...
Author:Time:2008-05-31 12:09:43 Hits:3 Comment:0 View Article...
Stringing Things Along
Why stop with numbers? PHP also allows you to add strings with the string concatenation operator, represented by a period (.). Take a look: ?php // set up some string variables $a = 'the' ; $b = 'games' ; $c = 'begin' ; $d = 'now' ; // combine them...
Author:Time:2008-05-31 12:08:08 Hits:5 Comment:0 View Article...
Copyright 2008 The PHPsu All rights reserved. This mirror generously provided by: .Hp Inc. ICP:08000822
Last updated: Fri Jun 6 18:18:33 GMT-8 2008