55 $this->full_name=$p_filename;
56 if (strpos($p_filename,
'/') !=
false)
58 $this->path=dirname($p_filename);
60 $this->filename=basename ($p_filename);
72 $ext_pos= strrpos($this->filename,
'.');
73 if ( $ext_pos ==
false ) {
74 $this->
type=
"application/octect";
77 $ext= substr($this->filename, $ext_pos+1, 3);
81 $this->
type=
'application/vnd.oasis.opendocument.text';
84 $this->
type=
'application/vnd.oasis.opendocument.spreadsheet';
87 $this->
type=
"application/pdf";
90 $this->
type=
"application/zip";
93 $this->
type=
"application/octet";
__construct($p_filename, $p_type="")
$filename
name of the file without path
guess_type()
set the $this->type to the mimetype, called from __construct
compute_name($p_filename)
Compute properly the filename.
$type
mimetype of the file
$full_name
Path to filename + filename.