[eluser]Unknown[/eluser]
hi below is my code: and this is what i am trying to do
1- get the file name from the url (successful)
2- get the mime extension (successful)
3- load the view (successful)
4- in the view trying to play the file (unsuccessful) because i cannot get the correct path.
controller
Code:
public function play()
{
$data['fileName'] = $this->uri->segment(3);
$data['ext'] = get_mime_by_extension($data['fileName']);
$data['title'] = 'Play Video';
$data['msg'] = 'You can also download this video by clicking on downlad if your browser does not supprt the type.';
$this->load->view('header', $data);
$this->load->view('menu');
$this->load->view('play');
}
view:
Code:
<object width="320" height="240" src="<?=('upload/'.$fileName.'')?>">
<embed width="320" height="240" src="<?=('upload/'.$fileName.'')?>"></embed>
</object>