当前位置:网站首页>PHP output (print) log to TXT text
PHP output (print) log to TXT text
2022-06-25 05:58:00 【Wish you a dream come true】
/**
* Print log
* $msg Log contents
*/
function printLog($msg) {
if (!is_dir('log')){
mkdir('log',0777,true);
}
$path="log/".date('Y-m-d').".log";
file_put_contents($path, "【" . date('Y-m-d H:i:s') . "】" . $msg . "\r\n\r\n", FILE_APPEND);
}
边栏推荐
- Websocket in the promotion of vegetable farmers
- "APEC industry +" biov Tech talks about the cross-border of Chinese biotechnology enterprises and "Pratt & Whitney Kangyu" | apec-hub public welfare
- An example of recursion, the full permutation problem of 1~n
- Wind farm visualization: wind farm data
- Analysis of IM project framework
- SAP ui5 tutorial for beginners part XXVI - detailed steps for using OData service with mock server trial version
- Guava-IO
- Kyma application connectivity feature introduction
- [golang] leetcode intermediate - Search rotation sort array & search two-dimensional matrix II
- Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
猜你喜欢
HashSet implementation class
MySQL tuning --01--- optimization steps and system performance parameters
Timed thread pool
Trouble of setting table property to null
SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
Design of IM login server and message server
Do you know what a three-tier architecture is?
Semantic segmentation fcns in the wild: pixel level adaptive and constraint based adaptation
Semantic segmentation cvpr2019-advance: advantageous enterprise minimization for domain adaptation in semantic segmentation
Day21 JMeter usage basis
随机推荐
What is flush software? Is it safe to open an account online?
Mongodb delete data
Mongodb basic concept learning - set
Deep analysis of epoll reactor code
Guava new collection type
Soft exam information system project manager_ Management Science (Operations Research) -- senior information system project manager of soft test 033
Introduction to the main features of kyma when the cloud native application runs
Laravel8 fill data
SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
Get the first letter of Chinese phonetic alphabet in Excel and capitalize it
Day22(File,DiGui,FileOutputStream)
Day19 (variable parameter, enhanced for loop traversal, generic wildcard <? >, TreeSet, linkedhashset, nested traversal of sets, set set, static import,)
Use of pytorch tensorboard
[untitled]
Timed thread pool
Aiot project that is an introduction to the basics of the Internet of things and can be implemented in practice
Day21 performance test process
Leetcode topic [array] -36- effective Sudoku
Getting started with Silverlight development 1
Farewell to Lombok in 996