PHP输出变量到文件

调试的时候,如果不方便在屏幕上输出变量,我们可以把变量值输出到文件:

file_put_contents(FILENAME, print_r($var, true));

当然,要保证写入的路径是可写的。


猜你喜欢

转载自blog.csdn.net/henryhu712/article/details/80088282