當前位置: 首頁>>代碼示例>>PHP>>正文


PHP file::get方法代碼示例

本文整理匯總了PHP中file::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP file::get方法的具體用法?PHP file::get怎麽用?PHP file::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在file的用法示例。


在下文中一共展示了file::get方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test_restful_can_be_any_argument

 public function test_restful_can_be_any_argument()
 {
     $this->generate->controller(array('admin', 'restful', 'index:post'));
     $contents = file::get(self::$controller);
     $this->assertContains('public $restful = true', $contents);
     $this->assertContains('post_index', $contents);
 }
開發者ID:Thuraya039,項目名稱:Laravel-Generator,代碼行數:7,代碼來源:generate_task.test.php

示例2: test_controllers_can_be_restful

 public function test_controllers_can_be_restful()
 {
     $this->generate->controller(array('admin', 'index', 'index:post', 'update:put', 'restful'));
     $contents = file::get(self::$controller);
     $this->assertContains('public $restful = true', $contents);
     $this->assertContains('get_index', $contents);
     $this->assertContains('post_index', $contents);
     $this->assertContains('put_update', $contents);
 }
開發者ID:nizamuddin,項目名稱:Laravel-Generator,代碼行數:9,代碼來源:generate_task.test.php

示例3: addNewFromFiles

 /**
  * Adding new files from Request in begin of uploading
  *
  * @param file $files   
  */
 public function addNewFromFiles($files)
 {
     $file = $files->get('file');
     $fileFullName = $file->getClientOriginalName();
     $this->status = self::STATUS_NEW;
     $this->fullname = $fileFullName;
     $fileParts = explode(".", $fileFullName);
     $this->ext = end($fileParts);
     $this->name = str_replace('.' . $this->ext, '', $fileFullName);
     $this->created = time();
     $this->mime = $file->getMimeType();
     $this->size = $file->getSize();
     $this->save();
     return $this;
 }
開發者ID:andrewkrug,項目名稱:repucaution,代碼行數:20,代碼來源:file.php


注:本文中的file::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。