data.cgiの中身が
「田中さん
山下さん
吉田さん」
だとすると
$msg = file(data.cgi);で

$msg[0] が田中さん
$msg[1] が山下さん
$msg[2] が吉田さん
となるのですか?