-2

我想在字符串的末尾加上一个单引号我怎么能在 php 中做这件事?

    $file = $this->form->getValue('doc');
    $filename = $file->getOriginalName();
    $file_name=$fn.'_'.md5($fiename);
    $extension = $file->getExtension($file->getOriginalExtension());
4

3 回答 3

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());
于 2013-11-13T06:43:23.630 回答
0

试试这个:

$file_name=$fn.'_'.md5($fiename).",";

在 php.中用于连接。

于 2013-11-13T06:44:59.107 回答
0

试试这个

$file = $this->form->getValue('doc');
$filename = $file->getOriginalName();
$file_name=$fn.'_'.md5($fiename)."'";
$extension = $file->getExtension($file->getOriginalExtension());
于 2013-11-13T07:59:42.323 回答