zoukankan      html  css  js  c++  java
  • php 创建文件

      /*
         * Method to create file 创建文件
         * Parameter : (string)filename, (string)content, (string)create mode
         * Return :  (boolean)
         */
        function create_file( $file, $content = '', $mode = "w" )
        {
            $handle = @fopen( $file, $mode );
            if ( ! $handle )
            {
                return false;
            }
            else
            {
                if ( ! @fwrite( $handle, $content ) )
                {
                    @fclose( $handle );
                    return false;
                }
                @fclose( $handle );
                return true;
            }
        }

  • 相关阅读:
    【学习笔记】最小表示法
    bzoj1912【Apio2010】patrol 巡逻
    hdu1057
    hdu1056
    hdu1055
    hdu1054
    hdu1053
    hdu1052
    hdu1051
    hdu1050
  • 原文地址:https://www.cnblogs.com/gaogaoxingxing/p/7691713.html
Copyright © 2011-2022 走看看