北京 php 替代,用ins的时候显示aserverwithspecifiedhostnamecould?

用户投稿 228 0

关于“php_mcrypt_替代”的问题,小编就整理了【3】个相关介绍“php_mcrypt_替代”的解答:

用ins的时候显示aserverwithspecifiedhostnamecould?打开php.ini文件 找到 ;extension=php_mcrypt.dll 改成 extension=php_mcrypt.dll 将php目录下libmcrypt.dll复制到C:\windows \system32目录中 重新启动Web服务。

北京如何利用Mcrypt扩展库进行加密和解密?以下为引用的内容:

  Blowfish RC2 Safer-sk64 xtea

  Cast-256 RC4 Safer-sk128

北京  DES RC4-iv Serpent

  Enigma Rijndael-128 Threeway

  Gost Rijndael-192 TripleDES

北京  LOKI97 Rijndael-256 Twofish

  PanamaSaferplus Wake

北京  如何安装Mcrypt?

北京  在标准的PHP软件包中不包括Mcrypt,因此需要下载它,下载的地址为: 。下载后,按照下面的方法进行编译,并把它扩充在PHP中:

北京  下载Mcrypt软件包。

  以下为引用的内容:

北京  gunzipmcrypt-x.x.x.tar.gz

  tar -xvfmcrypt-x.x.x.tar

北京  ./configure --disable-posix-threads

  make

北京  make install

北京  cd to your PHP directory.

北京  ./configure -with-mcrypt=[dir] [--other-configuration-directives]

什么函数可以替代unique函数?            可以使用集合(set)函数来代替unique函数,因为集合是一种无序的数据结构,可以确保创建的值是唯一的。

北京示例:

python复制my_list = [1, 2, 3, 1, 2, 4, 3, 5, 4]

北京my_set = set(my_list)

北京print(my_set) # 输出:{1, 2, 3, 4, 5}

如果你需要去重,可以使用列表推导式或者集合(set)函数。

示例:

北京使用列表推导式:

北京python复制my_list = [1, 2, 3, 1, 2, 4, 3, 5, 4]

new_list = [x for x in my_list if x not in my_set]

print(new_list) # 输出:[1, 2, 3, 4, 5]

使用集合(set)函数:

python复制my_list = [1, 2, 3, 1, 2, 4, 3, 5, 4]

北京new_list = list(set(my_list))

北京print(new_list) # 输出:[1, 2, 3, 4, 5]

到此,以上就是小编对于“php_mcrypt_替代”的问题就介绍到这了,希望介绍关于“php_mcrypt_替代”的【3】点解答对大家有用。

抱歉,评论功能暂时关闭!