소스 검색

bin2hex()

master
Siti Rahayu 6 년 전
부모
커밋
d43af174bb
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/Controller/Api/CompoundController.php

+ 1
- 1
src/Controller/Api/CompoundController.php 파일 보기

if($check) { if($check) {
// $name = 'accepted_'.$request->get('kp').'-'.$i++.'.'.$f->getClientOriginalExtension(); // $name = 'accepted_'.$request->get('kp').'-'.$i++.'.'.$f->getClientOriginalExtension();
$name = 'accepted_'.$request->get('kp').'-'.random_int(1, 10).'.'.$f->getClientOriginalExtension();
$name = 'accepted_'.$request->get('kp').'-'.bin2hex(random_bytes(8)).'.'.$f->getClientOriginalExtension();
$destinationPathImage[] = $urlPackage->getUrl('/'.$destinationPath.'/'.$name); $destinationPathImage[] = $urlPackage->getUrl('/'.$destinationPath.'/'.$name);
$f->move($destinationPath, $name); $f->move($destinationPath, $name);
$success_upload++; $success_upload++;

Loading…
취소
저장