0
$randomuser = array("user","user1","user2","user3","user4","user5");
shuffle($randomuser);

/** MySQL database username */
define('DB_USER', $randomuser);

上記のコードをwp-config.phpで機能させるにはどうすればよいですか?ありがとう。

4

1 に答える 1

0

2番目の引数で取得するランダムユーザーの数も設定できます。

$random_users = array_rand($random_user,5); //gets 5 random users from array
于 2012-11-11T08:14:41.070 に答える