I can access my file and work correctly in localhost, but problem starts when I move it to the host.
This is my code:
<a href="<?=base_url('uploads/syarat/'.$username.'/'.$namafile)?>" target="_blank">Show My Pdf</a>
I try this and have the same problem:
<embed src="<?php echo base_url();?>uploads/syarat/<?php echo $username.'/'.$namafile;?>" type="application/pdf" width="100%" height="
When I access directly, the server does not respond.
actually i can access easyly with google viewer
<div class="col-xs-12">
<div class="row">
<a href="https://docs.google.com/viewerng/viewer?url=<?php echo base_url();?>/uploads/syarat/<?php echo $username.'/'.$namafile;?>" class="btn btn-sm btn-primary" role="button"><i class="ace-icon glyphicon glyphicon-plus"></i> Buka Di Tab Baru</a>
</div><br/>
<object id="pdf" data="<?php echo base_url();?>uploads/syarat/<?php echo $username.'/'.$namafile;?>" type="application/pdf" width="100%" height="600px" />