이것의 대체문. 정보
이것의 대체문.본문
.
댓글 전체
php 4.2 이상부턴 별도의 선언이 필요없는걸로 알고 있습니다.
임의로 정하시고 싶으시다면. 아래 내용을 참고해보시기 바랍니다.
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
$randval = rand();
임의로 정하시고 싶으시다면. 아래 내용을 참고해보시기 바랍니다.
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
$randval = rand();