Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> PHP

ฟังก์ชัน realpath_cache_get() ใน PHP


ฟังก์ชัน realpath_cache_get() ใช้ดู รายการทั้งหมดใน realpath cache ส่งคืนเป็นอาร์เรย์ของข้อมูลแคชแต่ละรายการ

ไวยากรณ์ (Syntax)

realpath_cache_get()

พารามิเตอร์ (Parameters)

  • ไม่มีพารามิเตอร์

ค่าที่ส่งคืน (Return Value)

ส่งคืนอาร์เรย์ของรายการ realpath cache แต่ละรายการมี key, is_dir, realpath, expires

ตัวอย่างการใช้งาน

<?php
print_r(realpath_cache_get());
?>

ผลลัพธ์

Array ( [/home] => Array ( [key] => 4353355791257440477 [is_dir] => 1 [realpath] => /home [expires] => 1538630044 ) [/home/cg/root] => Array ( [key] => 1131813419205508649 [is_dir] => 1 [realpath] => /home/cg/root [expires] => 1538630044 ) [/home/cg/root/8944881/main.php] => Array ( [key] => 584844883037958768 [is_dir] => [realpath] => /home/cg/root/8944881/main.php [expires] => 1538630044 ) [/home/cg] => Array ( [key] => 9037225891674879750 [is_dir] => 1 [realpath] => /home/cg [expires] => 1538630044 ) [/home/cg/root/8944881] => Array ( [key] => 722006552431300374 [is_dir] => 1 [realpath] => /home/cg/root/8944881 [expires] => 1538630044 ) )