Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHPを使用して、文字列が任意のファイルへのパスであることを識別する方法は?
http://pt.php.net/is_file
$path = 'string'; if(is_file($path)){ // look, it's a file! }
is_file($filename) is_dir($filename)
true文字列が既存のファイルまたはディレクトリを指している場合に返されます。
true