PHP is_writeable() º¯Êý

¶¨ÒåºÍÓ÷¨

is_writeable() º¯ÊýÅжÏÖ¸¶¨µÄÎļþÊÇ·ñ¿Éд¡£

¸Ãº¯ÊýÊÇ is_writable() º¯ÊýµÄ±ðÃû¡£

Óï·¨

is_writeable(file)
²ÎÊý ÃèÊö
file ±ØÐè¡£¹æ¶¨Òª¼ì²éµÄÎļþ¡£

˵Ã÷

Èç¹ûÎļþ´æÔÚ²¢ÇÒ¿ÉдÔò·µ»Ø true¡£file ²ÎÊý¿ÉÒÔÊÇÒ»¸öÔÊÐí½øÐÐÊÇ·ñ¿Éд¼ì²éµÄĿ¼Ãû¡£

ÌáʾºÍ×¢ÊÍ

×¢ÊÍ£º±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÇëʹÓà clearstatcache() À´Çå³ý»º´æ¡£

Àý×Ó

<?php
$file = "test.txt";
if(is_writeable($file))
  {
  echo ("$file is writeable");
  }
else
  {
  echo ("$file is not writeable");
  }
?>

Êä³ö£º

test.txt is writeable
VUE