<?php
header("content-type:text/html;charset=utf-8");

$file = './aa.txt';
###判断是不是文件
if(is_file($file)){
####判断是不是可写
if(is_writable($file)){
   // echo "yes";
    ###判断文件是不是可读
    if(false !== ($handle=fopen($file,'a'))){
     // echo 1;
        ###执行写入操作
        $content="56789 \r\n";
// file_put_contents($file,$content,FILE_APPEND); //用于装载执行失败的数据 fwrite($handle,$content); ###效果同上 fclose($handle); }else{ echo "no open"; } }else{ echo "no write!"; } }else{ echo "no file"; } ?>

 

相关文章:

  • 2021-08-07
  • 2021-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
相关资源
相似解决方案