/include/ImageFunctions.php $dbkey is the name of image. /* * Return the hash path component of an image path (URL or filesystem), * e.g. "/3/3c/", or just "/" if hashing is not used. * * @param $dbkey The filesystem / database name of the file * @param $fromSharedDirectory Use the shared file repository? It may * use different hash settings from the local one. */ function wfGetHashPath ( $dbkey, $fromSharedDirectory = false ) { if( Image::isHashed( $fromSharedDirectory ) ) { $hash = md5($dbkey); return '/' . $hash{0} . '/' . substr( $hash, 0, 2 ) . '/'; } else { return '/'; } } 有问题还是去http://www.mediawiki.org/wiki/MediaWiki的好。