Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UploadComponent extends Component {
- private $max_files = 3;
- private $storage = WWW_ROOT.'alarm';
- private $typemine = array
- (
- 'audio/ogg',
- 'audio/mpeg',
- 'audio/mpeg4-generic',
- 'audio/mp4',
- 'audio/vorbis'
- );
- public function sanitize($unsafe)
- {
- settype($result, "string");
- $str = strtolower ($unsafe);
- $str = preg_replace('/[\r\n\t ]+/', '_', $str);
- $str = preg_replace('/[\"\*\/\:\<\>\?\'\|]+/', '', $str);
- $result = str_replace(' ', '_', $str);
- return $result;
- }
- public function send($files)
- {
- debug($this->typemine);
- debug($this->storage);
- debug($this->max_files);
- debug($thisβ>sanitize('SuperToo'));
- exit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement