Postingan lainnya
The upload path does not appear to be valid. saat upload ke luar base_url
Maaf mau tanya, saya mau upload file ke luar base_url() di CI atau keluar folder projecj saya gimana caranya ya gan, pakai realpath juga sudah di coba tapi malah ke folder master D;/ nya,.. tolong ya gan,...
syntax Controllers :
if(isset($_FILES['file']['name'])){
$no_ktp = $_POST['no_ktp']; $ukuran=$_FILES['file']['size']; $tipe=$_FILES['file']['type'];
$namabe=$_POST['nameb']; $nomorbe=$_POST['nomorb']; $masabe=$_POST['masa'];
if($tipe=='application/pdf'){ $filebe=$no_ktp.'_'.$namabe.'.pdf'; }elseif($tipe=='image/png'){ $filebe=$no_ktp.'_'.$namabe.'.png'; }else{ $filebe=$no_ktp.'_'.$namabe.'.jpg'; }
$config['upload_path'] = 'http://192.168.17.10/recruitment/dll/berkas/'; $config['allowed_types'] = 'gif|jpg|png|pdf'; $config['file_name'] = $filebe;
$this->load->library('upload', $config);
if (!$this->upload->do_upload('file')){
echo $error = $this->upload->display_errors(); }else{
$data = $this->upload->data(); echo "
";
print_r($result);
echo "
";
}
}
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban