Need your feedback
Site Search
-
Categories
- Actionscript (1)
- Django (28)
- iPhone (7)
- Javascript (12)
- Linux (13)
- Mac OS Basic (11)
- Misc (43)
- PHP (25)
- Python (2)
- Software Support (7)
- Uncategorized (1)
-
-
-
Tag Archives: PHP
An interesting PHP Example
<?php class A { protected static $actions = array(); public static function addAction( $fname, $fn ){ self::$actions[ $fname ] = $fn; } function __get( $name ){ $arr = self::$actions; if( key_exists( $name, $arr ) ){ return $arr[ $name ]; } … Continue reading
php get uuid from mysql
<?php /** * get uuid from mysql * first you need to setup your mysql connection * * @return uuid-string uuid string **/ function uuid(){ $r = mysql_query( “select uuid()” ); $row = mysql_fetch_array( $r ); $uuid = $row[0]; return … Continue reading
php uuid
/** * Generates an UUID * * @author Huang Xinhao <info@softwarematrix.cn> * @param string an optional prefix string * @return string the formatted uuid string */ function uuid( $prefix = ” ) { $chars = md5( uniqid( mt_rand(), true ) … Continue reading