The byte-order mark (BOM) is the Unicode character ("zero-width non-breaking whitespace") located at the code point U+FEFF. This character is used to indicate the byte order when encoding a string of UCS/Unicode characters as UTF-16 or UTF-32. It is often used as a marker to indicate that a file is encoded in UTF-8, UTF-16, or UTF-32.
- class encryption {
- function en($str,$key) {
- $ret='';
- $str = base64_encode ($str);
- for ($i=0; $i< ;=strlen($str)-1; $i++){
- $d_str=substr($str, $i, 1);
- $int =ord($d_str);
- $int=$int^$key;
- $hex=strtoupper(dechex($int));
- $ret.=$hex;
- }
- return $ret;
- }
- function de($str,$key) {
- $ret='';
- for ($i=0; $i<=strlen($str)-1; 0){
- $hex=substr($str, $i, 2);
- $dec=hexdec($hex);
- $dec= $dec^$key;
- $ret.=chr($dec);
- $i=$i+2;
- }
- return base64_decode($ret);
- }
- }
- $cryption=new encryption;
- ?>
Copy code
- /*
- * Created on 2012-3-23
- *
- * To change the template for this generated file go to
- * Window - Preferences - PHPeclipse - PHP - Code Templates
- */
-
- $content = '';
- preg_match('/]*src=["']Butt[/]?(.+?)["']Butt[^>]* >/si', $content, $matches);
-
- print_r($matches);
- echo '
';
-
- preg_match('/]*src=[ "']Butt[/]?(.+?)["']Butt[^>]*>/si', $content, $matches);
- print_r($matches);
-
- define( 'HTTP_PATH','http://'.$_SERVER['HTTP_HOST']);
- $img = getimagesize(HTTP_PATH.$matches[1]);
- print_r($img);
-
- mb_internal_encoding('UTF-8 ');
- $a = 'I love youI love you';
-
- echo mb_strlen($a);
- echo '
';
- echo mb_substr($a,1,2);
-
- ?>
-
Copy code
- // +---------------------------------------- --------------------------------
- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
- // + -------------------------------------------------- --------------------
- // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
- // +------ -------------------------------------------------- ---------------
- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- // +---------- -------------------------------------------------- ----------
- // | Author: liu21st
- // +--------------------- --------------------------------------------------
-
- //Define the ThinkPHP framework path
- define('THINK_PATH', 'ThinkPHP');
-
- //Define the project name and path
- define('APP_NAME', 'Home');
- define('APP_PATH', 'Home' );
-
-
- define('NO_CACHE_RUNTIME', true);
- //define('RUNTIME_ALLINONE', true);
-
-
- // Load the framework entry file
- require(THINK_PATH."/ThinkPHP.php");
-
- //Instantiate a website application instance
- App::run();
- ?>
Copy code
|