我想在字符串的末尾连接单引号 我怎么能在php中做这件事?
$file = $this->form->getValue('doc');
$filename = $file->getOriginalName();
$file_name=$fn.'_'.md5($fiename);
$extension = $file->getExtension($file->getOriginalExtension());
答案 0 :(得分:0)
试试这个
$file = $this->form->getValue('doc');
$filename = $file->getOriginalName();
$file_name=$fn.'_'.md5($filename); //There is no $fiename, so i changed it to $filename
$file_name=$file_name."'";//Concatenating here.
$extension = $file->getExtension($file->getOriginalExtension());
答案 1 :(得分:0)
试试这个:
$file_name=$fn.'_'.md5($fiename).",";
php .
中的用于concat。
答案 2 :(得分:0)
试试这个
$file = $this->form->getValue('doc');
$filename = $file->getOriginalName();
$file_name=$fn.'_'.md5($fiename)."'";
$extension = $file->getExtension($file->getOriginalExtension());