<?php $file = "123.txt"; if(is_writeable($file)) { echo ("$file可写"); } else { echo ("$file不可写"); } ?>