สมมติว่า
$str เป็นข้อความที่คุณต้องการ printคุณสามารถใช้ method ข้างล่างสำหรับการพิมพ์ข้อความออก system log
syslog(LOG_INFO, $str);อ่านข้อมูลเพิ่มเติมที่ https://www.php.net/manual/en/function.syslog.php
คุณสามารถใช้ method ข้างล่างสำหรับการพิมพ์ข้อความออก I/O streams อื่นๆ
$out = fopen('php://stdout', 'w'); //output handler
fputs($out, $str); //writing output operation
fclose($out); //closing handler
โดยที่ php://stdout สามารถแทนด้วย php://stderr หรือ php://outputอ่านข้อมูลเพิ่มเติมที่ https://www.php.net/manual/en/wrappers.php.php
No comments:
Post a Comment