Support Joomla!

references:joomla.framework:filesystem:jpath-check

Table of Contents

check

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage FileSystem Class JPath Method check Reference check() Never Work in Progress

Checks for snooping outside of the file system root. This prevents paths being used which either use .. to move up the folder tree or paths which do not start at JPATH_ROOT. This method does not return a value but will raise an error using the JError class if there is a problem with the path.

Syntax

void check ( $path )

$path string is a string containing a file system path to check.

Examples

Example

jimport( 'joomla.filesystem.path' );

JPath::check( '/../../../test.html' );

will produce an error.


Discussion

Full name:
E-Mail:
 
references/joomla.framework/filesystem/jpath-check.txt (537 views) · Last modified: 2007/08/15 15:06