I m 收到我需要拯救到数据库的齐普文档。 但这似乎没有得到完全的挽救。
在这项职能中:
public function executeUploadFile(sfWebRequest $request){
if (!$_FILES[ file ][ error ]){
$fn = $_FILES[ file ][ tmp_name ];
$fh = fopen($fn, r+ );
$fc = fread($fh, filesize($fn));
mail( me@myemail.com , test 3 ,$fn. - .filesize($fn). - .strlen($fc));
fclose($fh);
move_uploaded_file($_FILES[ file ][ tmp_name ],dirname(__FILE__). / .$_FILES[ file ][ name ]);
$q = Doctrine_Query::create()
->update( PrimhdLog )
->set( results , " ".mysql_escape_string($fc)." ")
->where("files_expected like %".$_FILES[ file ][ name ]."% ");
$sql = $q->getSqlQuery();
print $sql;
$uprows = $q->execute();
}else{
mail( me@myemail.com , uploadFile has error on file ,print_r($_FILES,1));
}
return sfView::NONE;
}
我的档案上载了4028,1658,2777的大小。 电子邮件记录和“ls -la”确认这些大小。
但是,SlectT char_length (results), length(results), primhd_log.* from primhd_log
WHERE 1显示其面积分别为3900,1607,2692。
如何确定这一问题的想法?
FCCC/SBI/2008/2。
Schema:
PrimhdLog: actAs: Timestampable: created: name: created type: timestamp columns: id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } created_by: { type: integer(4) } details: { type: clob(16000000), notnull: true } submitted: { type: timestamp } submitted_by: { type: integer(4) } results: { type: clob(16000000) } start: { type: timestamp } end: { type: timestamp } files_expected: { type: clob(16000000) } output_filename: { type: string(100) } relations: Creator: { class: Person, local: created_by, foreignAlias: CreatorPRIMHDLogList } Submitter: { class: Person, local: submitted_by, foreignAlias: SubmitterPRIMHDLogList }}