Php file operation class (create and write files) to generate logs. Path $ path;} determine operation method a append write if (! Empty ($ mode) {$ this-mode $ mode;} determines the written content if (! Empty ($ content) {$ this-content $ content;} $ handlefop
Path = $ path;} // Determine the operation method. a append the write if (! Empty ($ mode) {$ this-> mode = $ mode;} // judge the written content if (! Empty ($ content) {$ this-> content = $ content;} $ handle = fopen ($ this-> path, $ this-> mode ); // split the line feed $ string = explode (",", $ this-> content); foreach ($ string as $ v) {fwrite ($ handle, $ v. "\ r \ n") ;}fclose ($ handle) ;}// use $ log = new log (); // $ log-> addlog (); // do not pass the value to the default value. // $ log-> addlog (". /log "," a "," Content 1: $ content1 content 2: $ content2 content 3: $ content3 "); // upload multiple contents // $ log-> addlog (". /log "," a "," 123,123,123 "); // Insert and wrap at a time
Http://www.bkjia.com/PHPjc/780967.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/780967.htmlTechArticlepath = $ path;} // Determine the operation method a append write if (! Empty ($ mode) {$ this-> mode = $ mode;} // judge the written content if (! Empty ($ content) {$ this-> content = $ content;} $ handle = fop...