用die($msg)来设调试,若$msg为整型,则不打印结果
时间:2010-07-15 来源:reaven
今天用die()函数来debug程序,它死活不打印出来。后来查了下手册,发现原来die() 函数,传入的参数是整型时,参数会被识别为退出状态码,而不打印出来。以下是手册中的解释:
If status is an integer , that value will also be used as the exit status. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.
相关阅读 更多 +