references:joomla.framework:filesystem:jfile-makesafemakeSafe
Makes file name safe to use. This function filters out unsafe character sequences from the given file name. The regular expression used is: #\.\.[^A-Za-z0-9\.\_\- ]#. This will take out the combination of two dots (..) followed by anything that is not a letter, a number, a dot (.), an underscore (_), a hyphen (-) or a space ( ). Syntaxstring makeSafe ( $file )
ExamplesExample: This example gets the extension of a file. Example echo JFile::makeSafe( '..%clock.jpg' ); which will produce: Result clock.jpg Discussion |


