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


PHP resource::put方法代码示例

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


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

示例1: raw

 /**
  * Sends a raw command to the irc server
  * 
  * @param string  $data     String to send
  * @param integer $silent   Not implemented yet
  * @param integer $priority Not implemented yet
  *
  * @return void
  */
 public function raw($data, $silent = 0, $priority = 3)
 {
     if (SERVICE) {
         $extra = $this->parseCommand($data);
         if (in_array($extra['func'], array('JOIN', 'PART', 'QUIT', 'NICK', 'MODE', 'SERVER'))) {
             $str = '';
             foreach ($extra as $k => $v) {
                 if (is_array($v)) {
                     $str .= "[{$k}:{ ";
                     foreach ($v as $kk => $vv) {
                         $str .= "[{$kk}:{$vv}] ";
                     }
                     $str .= "}] ";
                 } else {
                     if (!empty($v)) {
                         $str .= "[{$k}:{$v}] ";
                     }
                 }
             }
             logWrite(L_DEBUG, '[DEBUG:REPLAY] ' . $str);
             $this->users->ircraw($this, $data, $extra);
         }
     }
     $this->socket->put($data . "\r\n");
     logWrite(L_DEBUG, '>> ' . $data);
     return true;
 }
开发者ID:bonan,项目名称:neotor,代码行数:36,代码来源:irc.php

示例2: put

 /**
  * This function will upload a file to the ftp-server.
  *
  * @access  public
  * @param   string $local_file  The local file to upload
  * @param   string $remote_file The absolute or relative path to the file to upload to
  * @param   bool   $overwrite   (optional) Whether to overwrite existing file
  * @param   int    $mode        (optional) Either FTP_ASCII or FTP_BINARY
  * @return  mixed               True on success, otherwise Jaws_Error
  */
 function put($local_file, $remote_file, $overwrite = false, $mode = null)
 {
     $res = $this->_ftp->put($local_file, $remote_file, $overwrite, $mode);
     if (PEAR::isError($res)) {
         return new Jaws_Error($res->getMessage(), __FUNCTION__);
     }
     return true;
 }
开发者ID:uda,项目名称:jaws,代码行数:18,代码来源:FTP.php

示例3: put

 /**
  * @param string $remoteFile
  * @param string $localFile
  * @param int    $startPos
  *
  * @return bool
  */
 public function put($remoteFile, $localFile, $startPos = -1)
 {
     switch ($this->_connType) {
         case SftpHelper::TYPE_SFTP:
         default:
             $res = $this->_connection->put($remoteFile, $localFile, NET_SFTP_LOCAL_FILE, $startPos);
             break;
         case SftpHelper::TYPE_FTP:
             $startPos = $startPos === -1 ? 0 : $startPos;
             $res = @ftp_put($this->_connection, $remoteFile, $localFile, FTP_BINARY, $startPos);
             break;
     }
     return $res;
 }
开发者ID:giovdk21,项目名称:deployii,代码行数:21,代码来源:SftpHelper.php

示例4: setRevision

 /**
  * Sets version hash on the server.
  */
 public function setRevision()
 {
     // By default we update the revision file to the local revision,
     // unless the sync command was called with a specific revision
     $localRevision = $this->currentRevision();
     if ($this->sync && $this->sync != 'sync') {
         $localRevision = $this->sync;
     }
     $consoleMessage = "Updating remote revision file to " . $localRevision;
     if ($this->sync) {
         $this->output("\r\n<yellow>SYNC: {$consoleMessage}");
     } else {
         $this->debug($consoleMessage);
     }
     try {
         $this->connection->put($localRevision, $this->dotRevision);
     } catch (\Exception $e) {
         throw new \Exception("Could not update the revision file on server: {$e->getMessage}()");
     }
 }
开发者ID:baoweber,项目名称:PHPloy,代码行数:23,代码来源:PHPloy.php


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