在https://dev.mysql.com/doc/apis-php/en/apis-php-mysqlnd.persist.html页上,它介绍了如何为永久连接禁用更改用户,如下所示:
shell# CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT" ./configure
--with-mysql=/usr/local/mysql/
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=/usr/local/mysql/bin/mysql_config
--enable-debug && make clean && make -j6
或
shell# export CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT"
shell# configure --whatever-option
shell# make clean
shell# make
但是这仅适用于Linux构建,请问当我想按照https://github.com/Microsoft/php-sdk-binary-tools中的步骤使用Windows的PHP SDK工具为Windows构建php mysqli时,我该怎么定义MYSQLI_NO_CHANGE_USER_ON_PCONNECT以禁用更改用户?>