stream_resolve_include_path
ထည့်သွင်းရန်အရဖိုင်အမည်ကိုဖြေရှင်းပါ
function name: stream_resolve_intude_path ()
သက်ဆိုင်သောဗားရှင်း: PHP 5> = 5.3.2
function ကိုဖော်ပြချက်: stream_resolve_intude_path () function ကိုမူပကတိလမ်းကြောင်းသို့ actlowative လမ်းကြောင်းကိုဖြေရှင်းပြီး file ကိုရှာရန် compat_thath တွင်ဖော်ပြထားသောလမ်းညွှန်ကိုရှာဖွေသည်။
အသုံးပြုမှု: string stream_resolve_includude_path (string $ filename)
Parametermer
Return Value: ဖိုင်တစ်ဖိုင်ကိုရှာပါကဖိုင်ကိုအကြွင်းမဲ့လမ်းခရီးသို့ပြန်သွားသည်။ ဖိုင်မရှိပါက false ကိုပြန်ပို့သည်။
ဥပမာ - ကျွန်ုပ်တို့တွင်အောက်ပါလမ်းညွှန်ဖွဲ့စည်းပုံရှိသည်ဆိုပါစို့။
// 示例1:使用相对路径$filename = '../includes/library.php'; $absolutePath = stream_resolve_include_path($filename); if ($absolutePath !== false) { echo "文件的绝对路径为:$absolutePath"; } else { echo "文件未找到"; } // 示例2:使用绝对路径$filename = '/var/www/includes/library.php'; $absolutePath = stream_resolve_include_path($filename); if ($absolutePath !== false) { echo "文件的绝对路径为:$absolutePath"; } else { echo "文件未找到"; }
output ရလဒ် - ဥပမာ 1 - ဖိုင်၏အကြွင်းမဲ့အာဏာလမ်းကြောင်းမှာ --VAR/WWW/ininudes/library/inibray.php ဥပမာ - ဖိုင်၏ပကတိလမ်းကြောင်း - /VAR/WWW/CICLudes/libray.php