import('ORG.Crypt.Base64'); $string = 'thinkphp'; $encrypt_string = Base64::encrypt($string); dump($encrypt_string);