File Validation
Want a successful Modern site?
Start with IQRA training; it’s easy and quick to your needs.
File Validation
-
filevalidation()Parametors
- data (array) (filename, file dir to move) (required)
- acceptable (array) (optional)
- max_size (Max uploaded File Size) (optional)
-
$direction (error action ) (optional)
acceptable
- Default accepted (
)array('image/jpeg','image/jpg','image/gif','image/png')
direction
- Reload (Will Reload if any condition false )
- "" (Will Redirect Reffered url if condition false)
$data = ['upload_img'=>'moved_to_dir']; filevalidation($data, $acceptable = null, $max_size = null, $direction = null) // if condition true then this area will execute