PHP fscanf()ฟังก์ชัน
❮ การอ้างอิงระบบไฟล์ PHPความหมายและการใช้งาน
ฟังก์ชัน fscanf() แยกวิเคราะห์อินพุตจากไฟล์ที่เปิดอยู่ตามรูปแบบที่ระบุ
หมายเหตุ: ช่องว่างใดๆ ในสตริงรูปแบบจะตรงกับช่องว่างใดๆ ในสตรีมอินพุต ซึ่งหมายความว่าแท็บ (\t) ในสตริงรูปแบบสามารถจับคู่อักขระเว้นวรรคเดียวในสตรีมอินพุตได้
ไวยากรณ์
fscanf(file, format, mixed)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
file | Required. Specifies the file to check |
format | Required. Specifies the format. Possible format values:
Additional format values. These are placed between the % and the letter (example %.2f):
Note: If multiple additional format values are used, they must be in the same order as above. |
mixed | Optional. |
รายละเอียดทางเทคนิค
คืนมูลค่า: | สตริงการอ่าน FALSE เมื่อล้มเหลว |
---|---|
รุ่น PHP: | 4.0.1+ |
❮ การอ้างอิงระบบไฟล์ PHP