How to include only if file exists

前端 未结 10 853
深忆病人
深忆病人 2020-12-28 12:24

I need an include function / statement that will include a file only if it exists. Is there one in PHP?

You might suggest using @include bu

10条回答
  •  醉话见心
    2020-12-28 12:53

    I think you have to use file_exists, because if there was such an include, it would have been listed here: http://php.net/manual/en/function.include.php

提交回复
热议问题