当前位置: 首页>>代码示例>>PHP>>正文


PHP Storage::copy方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Storage::copy方法的典型用法代码示例。如果您正苦于以下问题:PHP Storage::copy方法的具体用法?PHP Storage::copy怎么用?PHP Storage::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Storage的用法示例。


在下文中一共展示了Storage::copy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store

 /**
  * Store the Satis configuration.
  *
  * @param  \KevinDierkx\Muse\Http\Requests\Initialize\StoreRequest  $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store(StoreRequest $request)
 {
     Storage::copy('satis.json.dist', 'satis.json');
     $satis = App::make('satis');
     $satis->update($satis->getConfiguration(), $request->only('name', 'homepage'));
     return Redirect::route('admin.index')->with('success', 'The Satis repository has been successfully initialized!');
 }
开发者ID:kevindierkx,项目名称:muse,代码行数:13,代码来源:InitializeController.php

示例2: index

 public function index()
 {
     if (Storage::disk('local')->has('data.txt')) {
         if (!Storage::disk('local')->has('data_temp.txt')) {
             Storage::copy('data.txt', 'data_temp.txt');
         }
         $file = Storage::disk('local')->get('data.txt');
         if (strlen($file) == 0) {
             $content_temp = Storage::disk('local')->get('data_temp.txt');
             Storage::put('data.txt', $content_temp);
         }
         $file = Storage::disk('local')->get('data.txt');
         $small = substr($file, 0, strpos($file, "\n"));
         $file = substr($file, strpos($file, "\n") + 1);
         Storage::put('data.txt', $file);
         return Response::json(array('line' => $small));
     }
 }
开发者ID:PinkFLoyd92,项目名称:WebService_TextStorm,代码行数:18,代码来源:SentencesController.php

示例3: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     $array = Config::get('mail');
     switch ($this->settings->name) {
         case 'smtp_host':
             $array['host'] = $this->settings->str_value;
             break;
         case 'smtp_port':
             $array['port'] = $this->settings->int_value;
             break;
         case 'smtp_user':
             $array['username'] = $this->settings->str_value;
             break;
         case 'smtp_pass':
             $array['password'] = $this->settings->str_value;
             break;
         case 'smtp_tls':
             switch ($this->settings->int_value) {
                 case 1:
                     $array['encryption'] = 'tls';
                     break;
                 case 2:
                     $array['encryption'] = 'ssl';
                     break;
                 case 0:
                 default:
                     $array['encryption'] = null;
                     break;
             }
             break;
         case 'email_from_address':
             $array['from']['address'] = $this->settings->str_value == '' ? null : $this->settings->str_value;
             break;
         case 'email_from_name':
             $array['from']['name'] = $this->settings->str_value == '' ? null : $this->settings->str_value;
             break;
     }
     $data = var_export($array, 1);
     Storage::copy('/config/mail.php', '/storage/backups/config/mail.' . microtime(true) . '.bu.php');
     Storage::put('/config/mail.php', "<?php\n return {$data} ;");
     unset($array);
     unset($data);
 }
开发者ID:stryker250,项目名称:simple_ticket,代码行数:48,代码来源:UpdateMailConfig.php

示例4: retrieveFile

 public function retrieveFile(Submission $submissions, $file)
 {
     $form = $submissions->formdefinition()->first();
     if ($submissions->group()->users()->get()->contains(Auth::user())) {
         //$file = Storage::get("form/".$form->id."/".$file);
         $filepath = "form/" . $form->id . "/" . $file;
         //Storage::get(form/)
         // if(Storage::exists($filepath)){
         /* if(copy($filepath,"/var/www/calwebtool/public/downloads/".$file)){
                    return respones()->file("downloads/".$file);
                }
                //Storage::copy($filepath,"downloads/".$file);
                return response()->file("downloads/".$file);
            //}
            /*else{
                flash()->overlay("The file does not exist.","Not Found");
                return redirect()->back();
            }*/
         if (Storage::exists($filepath)) {
             if (Storage::exists("downloads/" . $file)) {
                 Storage::delete("downloads/" . $file);
             }
             Storage::copy($filepath, "downloads/" . $file);
             return response()->download("downloads/" . $file);
         }
     }
 }
开发者ID:kcattakcaz,项目名称:CALwebtool,代码行数:27,代码来源:SubmissionController.php

示例5: copyEnv

 /**
  * Copy ENV file.
  *
  * @return $this
  */
 private function copyEnv()
 {
     Storage::copy("{$this->getPath()}/.env.example", "{$this->getPath()}/.env.gitlab");
     return $this;
 }
开发者ID:iolson,项目名称:support,代码行数:10,代码来源:GitlabGenerate.php


注:本文中的Illuminate\Support\Facades\Storage::copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。