Yii Framework Forum: Save File Di Server - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Save File Di Server Simpan gambar pada disk server Rate Topic: -----

#1 User is offline   oomyudo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 23-October 12

Posted 24 October 2012 - 03:17 AM

Permisi saya ingin menanyakan,bagaimana cara menyimpan file yang diupload di local disk server.jika pada tutorial mencontohkan untuk upload file ke local disk seperti ini

Quote

$model->image->saveAs(Yii::app()->basePath . '\..\protected\images\ ' . $model->news_id .".jpg");

nah bagaimana untuk menyimpan file di local disk pada server?
0

#2 User is offline   xent 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 14-November 10

Posted 09 November 2012 - 12:10 AM

itu file separatornya kebalik yak
mungkin harusnya
$model->image->saveAs(Yii::app()->basePath . '/../protected/images/ ' . $model->news_id .".jpg");

patnya mau nyimpen di mana nih di /proteced/images atau /images, kalo di protected/images file tidak dapat diakses dari browser kalo /images bisa

coba ikuti tutor dari sini http://scriptaste.bl...-sederhana.html
xent

My first app: School Information System
Find error? Post here
My Blog
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users