Tag Archives: Yii File

FTP File Transfer Using Yii

This tutorials will helpful to transfer the large files (or small files)  from ftp folder to your application folder. When you upload the large files (in applications), It will take some times. But if you use ftp file transfer It will transfer the files fast. Based on my experience i explained below. Create Ftp Account […]

CSV File To DB In Yii

CSV File Upload Read CSV In Controller CSV File Upload Using the below code i created the form “importcsvform.php”. importcsvform <div class=”form”> <?php $form=$this->beginWidget(‘CActiveForm’, array( ‘id’=>’csv-form’, ‘enableAjaxValidation’=>false, ‘htmlOptions’=>array(‘enctype’ => ‘multipart/form-data’), )); ?> <?php //echo $form->errorSummary($model); ?> <div class=”row”> <?php echo $form->labelEx($model,’csvfile’); ?> <?php $this->widget(‘CMultiFileUpload’, array( ‘model’=>$model, ‘name’ => ‘csvfile’, ‘max’=>1, ‘accept’ => ‘csv’, ‘duplicate’ => […]

Yii Hint For Files Handling

This post will help you to learn “how to delete files in yii framework”. I deleted singele file and all files from directory. Delete All Files Inside Directory php glob() method used to read all files from directory of yii application and unlink() method used to delete the files. //your directory $dir=Yii::app()->basePath.’/files/foldername/’; foreach(glob($dir.’*.*’) as $files){ […]