method checkFilename documentation in bbn\Str

Checks if a string doesn't contain a filesystem path.

Example

X::dump(\bbn\Str::checkFilename("Paul")); // (bool) true X::dump(\bbn\Str::checkFilename("Paul/")); // (bool) false function() { $args = \func_get_args(); foreach ($args as $a){ if (($a === '..' || $a === '.') || !\is_string($a) || (strpos($a, '/') !== false) || (strpos($a, '\\') !== false)) { return false; } } return true; }

Checks if a string doesn't contain a filesystem path. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.