php实现301跳转,由于想要做下seo所以决定把带www的域名跳转到不带www的上去,话说我与别人是反的。。

if strtolower $_SERVER 'SERVER_NAME' !='lilei.in' $URIRedirect=$_SERVER 'REQUEST_URI' ;
if strtolower $URIRedirect =="/index.php" $URIRedirect="/";
header 'HTTP/1.1 301 Moved Permanently' ;
header 'Location:http://lilei.in'.$URIRedirect ;
exit ;

bae消息队列的使用,现在是适用于wp的,后来再修改吧

它的上一行添加如下代码:
/**

  • BAE Send Mail
  • BCMS
    */

if ( !function_exists( 'wp_mail' ) ) :
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
require_once ABSPATH . WPINC . '/Bcms.class.php';

$bcms = new Bcms () ;
$ret = $bcms->mail ( BCMS_QUEUE, $message, array($to), array( Bcms::MAIL_SUBJECT => $subject)) ;

if ( false === $ret ) {
return false;
} else {
return true;

}

}
endif;