REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.74 KB
Close
/home/jambtst2015/public_html/protected/extensions/Csvreader.php
Text
Base64
<?php /** * CCsvreader class file. * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ class Csvreader extends CController { var $fields; /** columns names retrieved after parsing */ var $separator = ','; /** separator used to explode each line */ var $enclosure = '"'; /** enclosure used to decorate each field */ var $max_row_size = 4096; /** maximum row size to be used for decoding */ public static function parse_file($p_Filepath, $p_NamedFields = true) { $content = false; $file = fopen($p_Filepath, 'r'); if($p_NamedFields) { $this->fields = fgetcsv($file, $this->max_row_size, $this->separator, $this->enclosure); } while( ($row = fgetcsv($file, $this->max_row_size, $this->separator, $this->enclosure)) != false ) { if( $row[0] != null ) { // skip empty lines if( !$content ) { $content = array(); } if( $p_NamedFields ) { $items = array(); // I prefer to fill the array with values of defined fields foreach( $this->fields as $id => $field ) { if( isset($row[$id]) ) { $field = str_replace(" ","_",strtolower($field)); $items[$field] = trim($row[$id]); } } $content[] = $items; } else { $content[] = $row; } } } fclose($file); return $content; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
yii-mail
DIR
-
drwxr-xr-x
2025-10-09 04:11:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
yii-multimailer
DIR
-
drwxr-xr-x
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.htaccess
81 B
lr--r--r--
2024-12-09 06:09:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Csvreader.php
1.74 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error_log
9.75 KB
lrw-r--r--
2025-11-03 23:01:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EUploadedImage.php
11.84 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wrapper.php
65.71 KB
lr--r--r--
2024-04-12 06:09:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
yii-mail_r9.zip
935.79 KB
lrwxrwxrwx
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Unzip here
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
yii-multimailer.zip
84.30 KB
lrwxrwxrwx
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Unzip here
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).