(PHP 4 >= 4.2.0, PHP 5 < 5.1.0)
dio_seek — 從 whence 搜尋 fd 上的 pos
範例 #1 設定檔案位置
<?php
$fd = dio_open('/dev/ttyS0', O_RDWR);
dio_seek($fd, 10, SEEK_SET);
// 目前位置為從檔案開頭算起的第 10 個字元
dio_seek($fd, -2, SEEK_CUR);
// 目前位置為從檔案開頭算起的第 8 個字元
dio_seek($fd, -5, SEEK_END);
// 目前位置為從檔案結尾算起的第 5 個字元
dio_seek($fd, 10, SEEK_END);
// 目前位置為超過檔案結尾 10 個字元的位置。
// 檔案結尾到目前位置之間的 10 個字元將會填入零。
dio_close($fd);
?>