PageRenderTime 1388ms queryTime 75ms sortTime 281ms getByIdsTime 701ms findMatchingLines 116ms

47+ results for 'php fread repo:libis/Flandrica' (1388 ms)

Not the results you expected?
File.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
21 */
                    
38     */
                    
39    abstract protected function _fread($length=1);
                    
40
                    
107    {
                    
108        return ord($this->_fread(1));
                    
109    }
                    
129    {
                    
130        return $this->_fread($num);
                    
131    }
                    
153    {
                    
154        $str = $this->_fread(4);
                    
155
                    
                
Ntp.php https://github.com/Exercise/zf2.git | PHP | 434 lines
                    
1<?php
                    
2/**
                    
208    {
                    
209        $flags = ord(fread($this->_socket, 1));
                    
210        $info  = stream_get_meta_data($this->_socket);
                    
219            'flags'          => $flags,
                    
220            'stratum'        => ord(fread($this->_socket, 1)),
                    
221            'poll'           => ord(fread($this->_socket, 1)),
                    
221            'poll'           => ord(fread($this->_socket, 1)),
                    
222            'precision'      => ord(fread($this->_socket, 1)),
                    
223            'rootdelay'      => $this->_getFloat(fread($this->_socket, 4)),
                    
223            'rootdelay'      => $this->_getFloat(fread($this->_socket, 4)),
                    
224            'rootdispersion' => $this->_getFloat(fread($this->_socket, 4)),
                    
225            'referenceid'    => fread($this->_socket, 4),
                    
225            'referenceid'    => fread($this->_socket, 4),
                    
226            'referencestamp' => $this->_getTimestamp(fread($this->_socket, 8)),
                    
227            'originatestamp' => $this->_getTimestamp(fread($this->_socket, 8)),
                    
                
File.php https://github.com/querl/Tine-2.0-Open-Source-Groupware-and-CRM.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
38     */
                    
39    abstract protected function _fread($length=1);
                    
40
                    
107    {
                    
108        return ord($this->_fread(1));
                    
109    }
                    
129    {
                    
130        return $this->_fread($num);
                    
131    }
                    
153    {
                    
154        $str = $this->_fread(4);
                    
155
                    
                
File.php https://github.com/Enrise/Zend.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
                    
21 */
                    
38     */
                    
39    abstract protected function _fread($length=1);
                    
40
                    
107    {
                    
108        return ord($this->_fread(1));
                    
109    }
                    
129    {
                    
130        return $this->_fread($num);
                    
131    }
                    
153    {
                    
154        $str = $this->_fread(4);
                    
155
                    
                
HttpClient.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 352 lines
                    
1<?php
                    
2/**
                    
25 */
                    
26require_once 'Zend/Http/Client.php';
                    
27
                    
100        if (!$fp) {
                    
101            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
102            throw new Zend_Gdata_App_InvalidArgumentException('Failed to open private key file for AuthSub.');
                    
106        while (!feof($fp)) {
                    
107            $key .= fread($fp, 8192);
                    
108        }
                    
115     *
                    
116     * In order to call this method, openssl must be enabled in your PHP
                    
117     * installation.  Otherwise, a Zend_Gdata_App_InvalidArgumentException
                    
126        if ($key != null && !function_exists('openssl_pkey_get_private')) {
                    
127            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
128            throw new Zend_Gdata_App_InvalidArgumentException(
                    
                
file_helper.php https://gitlab.com/lisit1003/TTPHPServer | PHP | 479 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
62		{
                    
63			$data =& fread($fp, filesize($file));
                    
64		}
                    
240
                    
241			// foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
242			while (FALSE !== ($file = readdir($fp)))
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
354		{
                    
355			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
                    
356			{
                    
                
file_helper.php https://github.com/viruskimera/Agencia.git | PHP | 479 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
62		{
                    
63			$data =& fread($fp, filesize($file));
                    
64		}
                    
240
                    
241			// foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
242			while (FALSE !== ($file = readdir($fp)))
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
477
                    
478/* End of file file_helper.php */
                    
479/* Location: ./system/helpers/file_helper.php */
                    
                
shp.php https://bitbucket.org/graaaf/garant.git | PHP | 426 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * ESRI Shape file import plugin for phpMyAdmin
                    
4 *
                    
4 *
                    
5 * @package PhpMyAdmin-Import
                    
6 * @subpackage ESRI_Shape
                    
7 */
                    
8if (! defined('PHPMYADMIN')) {
                    
9    exit;
                    
33    set_include_path(get_include_path() . PATH_SEPARATOR . getcwd() . '/libraries/bfShapeFiles/');
                    
34    include_once './libraries/bfShapeFiles/ShapeFile.lib.php';
                    
35
                    
58    /**
                    
59     * This class extends ShapeFile class to cater the following phpMyAdmin
                    
60     * specific requirements.
                    
                
OLE.php https://bitbucket.org/blackriver/openx.git | PHP | 410 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP Version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2002 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 2.02 of the PHP license,      |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
10// | available at through the world-wide-web at                           |
                    
11// | http://www.php.net/license/2_02.txt.                                 |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
13// | obtain it through the world-wide-web, please send a note to          |
                    
14// | license@php.net so we can mail you a copy immediately.               |
                    
15// +----------------------------------------------------------------------+
                    
                
korean.rb https://github.com/ginkel/redmine.git | Ruby | 436 lines
                    
23#
                    
24# This is direct port of korean.php
                    
25#
                    
328  		f=fopen(file,'rb')
                    
329  		putstream(fread(f,size))
                    
330  		fclose(f)
                    
                
index.php https://github.com/karpenoktem/punbb.git | PHP | 244 lines
                    
128else if (isset($_PHPA))
                    
129	$php_accelerator = '<a href="http://www.php-accelerator.co.uk/">ionCube PHP Accelerator</a>';
                    
130else if (ini_get('apc.enabled'))
                    
130else if (ini_get('apc.enabled'))
                    
131	$php_accelerator ='<a href="http://www.php.net/apc/">Alternative PHP Cache (APC)</a>';
                    
132else if (ini_get('zend_optimizer.optimization_level'))
                    
204					<h3 class="ct-legend hn"><span><?php echo $lang_admin_index['Server load'] ?></span></h3>
                    
205					<p><span><?php echo $server_load ?> (<?php echo $num_online.' '.$lang_admin_index['users online']?>)</span></p>
                    
206				</div>
                    
213						<li><span><?php echo $lang_admin_index['Operating system'] ?>: <?php echo PHP_OS ?></span></li>
                    
214						<li><span>PHP: <?php echo PHP_VERSION ?> - <a href="<?php echo forum_link($forum_url['admin_index']) ?>?action=phpinfo"><?php echo $lang_admin_index['Show info'] ?></a></span></li>
                    
215						<li><span><?php echo $lang_admin_index['Accelerator'] ?>: <?php echo $php_accelerator ?></span></li>
                    
226						<li><span><?php echo $lang_admin_index['Rows'] ?>: <?php echo forum_number_format($total_records) ?></span></li>
                    
227						<li><span><?php echo $lang_admin_index['Size'] ?>: <?php echo $total_size ?></span></li>
                    
228<?php endif; ?>
                    
                
BodyTest.php https://gitlab.com/leon0399/damnit-engine | PHP | 401 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @link      https://github.com/slimphp/Slim
                    
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
                    
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
                    
7 * @license   https://github.com/slimphp/Slim/blob/master/LICENSE.md (MIT License)
                    
8 */
                    
13
                    
14class BodyTest extends \PHPUnit_Framework_TestCase
                    
15{
                    
42    {
                    
43        $stream = fopen('php://temp', $mode);
                    
44        fwrite($stream, $this->text);
                    
81
                    
82        $this->assertEquals('php://temp', $body->getMetadata('uri'));
                    
83    }
                    
                
Misc.php https://bitbucket.org/tdevonshire/guinness-jazz-festival.git | PHP | 388 lines
                    
1<?php
                    
2/*
                    
30        if (!empty($_GET['langCode']) && preg_match("/^[a-z\-]+$/", $_GET['langCode'])) {
                    
31            if (file_exists(CKFINDER_CONNECTOR_LANG_PATH . "/" . $_GET['langCode'] . ".php"))
                    
32                $langCode = $_GET['langCode'];
                    
64    /**
                    
65     * @link http://pl.php.net/manual/en/function.imagecopyresampled.php
                    
66     * replacement to imagecopyresampled that will deliver results that are almost identical except MUCH faster (very typically 30 times faster)
                    
110    /**
                    
111     * @link http://pl.php.net/manual/pl/function.imagecreatefromjpeg.php
                    
112     * function posted by e dot a dot schultz at gmail dot com
                    
132        //Default memory limit is 8MB so well stick with that.
                    
133        //To find out what yours is, view your php.ini file.
                    
134        $memoryLimit = CKFinder_Connector_Utils_Misc::returnBytes(@ini_get('memory_limit'))/$MB;
                    
170    /**
                    
171     * convert shorthand php.ini notation into bytes, much like how the PHP source does it
                    
172     * @link http://pl.php.net/manual/en/function.ini-get.php
                    
                
ArticleEventLogEntry.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 494 lines
                    
389			case ARTICLE_LOG_PROOFREAD_ASSIGN:
                    
390				return 'submission.event.proofread.proofreaderAssigned';
                    
391			case ARTICLE_LOG_PROOFREAD_UNASSIGN:
                    
391			case ARTICLE_LOG_PROOFREAD_UNASSIGN:
                    
392				return 'submission.event.proofread.proofreaderUnassigned';
                    
393			case ARTICLE_LOG_PROOFREAD_INITIATE:
                    
393			case ARTICLE_LOG_PROOFREAD_INITIATE:
                    
394				return 'submission.event.proofread.proofreadInitiated';
                    
395			case ARTICLE_LOG_PROOFREAD_REVISION:
                    
395			case ARTICLE_LOG_PROOFREAD_REVISION:
                    
396				return 'submission.event.proofread.proofreadRevision';
                    
397			case ARTICLE_LOG_PROOFREAD_COMPLETE:
                    
397			case ARTICLE_LOG_PROOFREAD_COMPLETE:
                    
398				return 'submission.event.proofread.proofreadCompleted';
                    
399
                    
                
mail.php https://bitbucket.org/allanxyh/uniquemall.git | PHP | 406 lines
                    
1<?php
                    
2class Mail {
                    
95		$header .= 'Return-Path: ' . $this->from . $this->newline;
                    
96		$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
                    
97		//$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
                    
127				
                    
128				$content = fread($handle, filesize($attachment));
                    
129				
                    
158			} else {
                    
159				if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
160					socket_set_timeout($handle, $this->timeout, 0);
                    
358					foreach ($results as $result) {
                    
359						if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
360							fputs($handle, $result . $this->crlf);
                    
                
unpack.php https://gitlab.com/milo-ft/osTicket | PHP | 270 lines
                    
1<?php
                    
2
                    
54        # Read the main.inc.php script
                    
55        $bootstrap_php = $this->destination . '/bootstrap.php';
                    
56        $lines = explode("\n", file_get_contents($bootstrap_php));
                    
75        }
                    
76        if (!file_put_contents($bootstrap_php, implode("\n", $lines)))
                    
77            die("Unable to configure location of INCLUDE_DIR in bootstrap.php\n");
                    
151     * exclude - (string | array<string>) patterns that will be matched
                    
152     *      using the PHP `fnmatch` function. If any file or folder matches,
                    
153     *      it will be excluded from the copy procedure. Omit or use false
                    
206        $pipes = array();
                    
207        $php = proc_open('php', array(
                    
208            0 => array('pipe', 'r'),
                    
211
                    
212        fwrite($pipes[0], "<?php
                    
213        include '{$this->destination}/bootstrap.php';
                    
                
WindowsAzure.php https://github.com/necrogami/zf2.git | PHP | 448 lines
                    
1<?php
                    
2/**
                    
55    const RETURN_STRING = 2; // return data as string
                    
56    const RETURN_STREAM = 3; // return PHP stream
                    
57
                    
208            while (!feof($fpSource)) {
                    
209                fwrite($fpDestination, fread($fpSource, 8192));
                    
210            }
                    
                
SYLK.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 450 lines
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
44 */
                    
45class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
                    
46{
                    
213	/**
                    
214	 * Loads PHPExcel from file into PHPExcel instance
                    
215	 *
                    
216	 * @param 	string 		$pFilename
                    
217	 * @param	PHPExcel	$objPHPExcel
                    
218	 * @return 	PHPExcel
                    
220	 */
                    
221	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
                    
222	{
                    
                
LayoutEditorAction.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 349 lines
                    
1<?php
                    
2
                    
7/**
                    
8 * @file classes/submission/layoutEditor/LayoutEditorAction.inc.php
                    
9 *
                    
18
                    
19// $Id: LayoutEditorAction.inc.php,v 1.38.2.1 2009/04/08 19:42:50 asmecher Exp $
                    
20
                    
266	/**
                    
267	 * View proofread comments.
                    
268	 * @param $article object
                    
269	 */
                    
270	function viewProofreadComments($article) {
                    
271		if (!HookRegistry::call('LayoutEditorAction::viewProofreadComments', array(&$article))) {
                    
271		if (!HookRegistry::call('LayoutEditorAction::viewProofreadComments', array(&$article))) {
                    
272			import("submission.form.comment.ProofreadCommentForm");
                    
273
                    
                
Search.php https://gitlab.com/digitalpoetry/exceptionally-timed | PHP | 462 lines
                    
1<?php namespace Myth\Docs;
                    
2/**
                    
28 * @license     http://opensource.org/licenses/MIT  (MIT)
                    
29 * @link        http://sprintphp.com
                    
30 * @since       Version 1.0
                    
64     */
                    
65    protected $allowed_file_types = 'html|htm|php|php4|php5|txt|md';
                    
66
                    
179            $handle = fopen($path, 'r');
                    
180            $text = fread($handle, $this->byte_size);
                    
181
                    
                
String.php https://github.com/joshbhamilton/todophp.git | PHP | 440 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
5 * @copyright     Copyright 2011, Union of RAD (http://union-of-rad.org)
                    
6 * @license       http://opensource.org/licenses/mit-license.php The MIT License
                    
7 */
                    
128				return static::$_source = function($bytes) use (&$fp) {
                    
129					return fread($fp, $bytes);
                    
130				};
                    
154	 *
                    
155	 * @link http://php.net/manual/en/function.hash.php PHP Manual: `hash()`
                    
156	 * @link http://php.net/manual/en/function.hash-hmac.php PHP Manual: `hash_hmac()`
                    
156	 * @link http://php.net/manual/en/function.hash-hmac.php PHP Manual: `hash_hmac()`
                    
157	 * @link http://php.net/manual/en/function.hash-algos.php PHP Manual: `hash_algos()`
                    
158	 * @param string $string The string to hash.
                    
                
module.audio-video.flv.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 505 lines
                    
1<?php
                    
2/////////////////////////////////////////////////////////////////
                    
28//                                                             //
                    
29// module.audio-video.flv.php                                  //
                    
30// module for analyzing Shockwave Flash Video files            //
                    
50		$FLVdataLength = $ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'];
                    
51		$FLVheader = fread($fd, 5);
                    
52
                    
67
                    
68		$FrameSizeDataLength = getid3_lib::BigEndian2Int(fread($fd, 4));
                    
69		$FLVheaderFrameLength = 9;
                    
79		while ((ftell($fd) + 16) < $ThisFileInfo['avdataend']) {
                    
80			$ThisTagHeader = fread($fd, 16);
                    
81
                    
182						fseek($fd, -1, SEEK_CUR);
                    
183						$reader = new AMFReader(new AMFStream(fread($fd, $DataLength)));
                    
184						$eventName = $reader->readData();
                    
                
HTML.php https://bitbucket.org/crowdguru/phpexcel.git | PHP | 495 lines
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
149		// Create new PHPExcel
                    
150		$objPHPExcel = new PHPExcel();
                    
151
                    
430	/**
                    
431	 * Loads PHPExcel from file into PHPExcel instance
                    
432	 *
                    
433	 * @param 	string 		$pFilename
                    
434	 * @param	PHPExcel	$objPHPExcel
                    
435	 * @return 	PHPExcel
                    
437	 */
                    
438	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
                    
439	{
                    
                
HTTP_WebDAV_Server_vCal.php https://github.com/jacknicole/sugarcrm_dev.git | PHP | 430 lines
                    
1<?php
                    
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
                    
42
                    
43require_once 'modules/Calendar/Calendar.php';
                    
44
                    
44
                    
45require_once 'include/HTTP_WebDAV_Server/Server.php';
                    
46
                    
352            // open input stream
                    
353            $options["stream"] = fopen("php://input", "r");
                    
354            $content = '';
                    
358            {
                    
359               $content .= fread($options["stream"], 4096);
                    
360            }
                    
                
UserXMLParser.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 416 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @file UserXMLParser.inc.php
                    
5 *
                    
15
                    
16// $Id: UserXMLParser.inc.php,v 1.22 2009/05/13 00:14:46 asmecher Exp $
                    
17
                    
327	function validRole($roleType) {
                    
328		return isset($roleType) && in_array($roleType, array('manager', 'editor', 'sectionEditor', 'layoutEditor', 'reviewer', 'copyeditor', 'proofreader', 'author', 'reader', 'subscriptionManager'));
                    
329	}
                    
                
test_ext_mailparse.cpp https://github.com/diegoIta/hiphop-php.git | C++ | 412 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
6   +----------------------------------------------------------------------+
                    
7   | This source file is subject to version 3.01 of the PHP license,      |
                    
8   | that is bundled with this package in the file LICENSE, and is        |
                    
9   | available through the world-wide-web at the following url:           |
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
49bool TestExtMailparse::test_mail() {
                    
50  //VCB("<?php ");
                    
51  return Count(true);
                    
                
Fl_Shared_Image.cxx https://github.com/paniwani/OTB.git | C++ | 467 lines
                    
24//
                    
25//     http://www.fltk.org/str.php
                    
26//
                    
226  if ((fp = fopen(name_, "rb")) != NULL) {
                    
227    fread(header, 1, sizeof(header), fp);
                    
228    fclose(fp);
                    
                
SCP.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 360 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Pure-PHP implementation of SCP.
                    
5 *
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
7 *
                    
8 * The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}.
                    
9 *
                    
11 * <code>
                    
12 * <?php
                    
13 *    include 'Net/SCP.php';
                    
13 *    include 'Net/SCP.php';
                    
14 *    include 'Net/SSH2.php';
                    
15 *
                    
                
function.imap-mail-compose.html https://bitbucket.org/thncr/manuals.git | HTML | 104 lines
                    
11 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="function.imap-mail-compose" class="refentry">
                    
15  <h1 class="refname">imap_mail_compose</h1>
                    
16  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_mail_compose</span> &mdash; <span class="dc-title">Create a MIME message based on given envelope and body sections</span></p>
                    
17
                    
89<div class="phpcode"><code><span style="color: #000000">
                    
90<span style="color: #0000BB">&lt;?php<br /><br />$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"from"</span><span style="color: #007700">]=&nbsp;</span><span style="color: #DD0000">"joe@example.com"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"to"</span><span style="color: #007700">]&nbsp;&nbsp;=&nbsp;</span><span style="color: #DD0000">"foo@example.com"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$envelope</span><span style="color: #007700">[</span><span style="color: #DD0000">"cc"</span><span style="color: #007700">]&nbsp;&nbsp;=&nbsp;</span><span style="color: #DD0000">"bar@example.com"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$part1</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPEMULTIPART</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part1</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"mixed"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/tmp/imap.c.gz"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$contents&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fread</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">filesize</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPEAPPLICATION</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"encoding"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">ENCBINARY</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"octet-stream"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"description"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$part2</span><span style="color: #007700">[</span><span style="color: #DD0000">"contents.data"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$contents</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"type"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">TYPETEXT</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"subtype"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"plain"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"description"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"description3"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$part3</span><span style="color: #007700">[</span><span style="color: #DD0000">"contents.data"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">"contents.data3\n\n\n\t"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$body</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">$part3</span><span style="color: #007700">;<br /><br />echo&nbsp;</span><span style="color: #0000BB">nl2br</span><span style="color: #007700">(</span><span style="color: #0000BB">imap_mail_compose</span><span style="color: #007700">(</span><span style="color: #0000BB">$envelope</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$body</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span>
                    
91</span>
                    
102 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
                    
103 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
104</div></body></html>
                    
                
LoggerClient.h https://github.com/akosmasoftware/Notitas.git | C Header | 231 lines
                    
8 *
                    
9 * BSD license follows (http://www.opensource.org/licenses/bsd-license.php)
                    
10 * 
                    
98	CFWriteStreamRef bufferWriteStream;				// If bufferFile not NULL and we're not connected, points to a stream for writing log data
                    
99	CFReadStreamRef bufferReadStream;				// If bufferFile not NULL, points to a read stream that will be emptied prior to sending the rest of in-memory messages
                    
100	
                    
                
backupdb.php https://gitlab.com/Conors99/ppm-1.8 | PHP | 484 lines
                    
1<?php
                    
2/**
                    
52
                    
53$page->add_breadcrumb_item($lang->database_backups, "index.php?module=tools-backupdb");
                    
54
                    
61		flash_message($lang->error_file_not_specified, 'error');
                    
62		admin_redirect("index.php?module=tools-backupdb");
                    
63	}
                    
83		{
                    
84			echo fread($handle, 8192);
                    
85		}
                    
90		flash_message($lang->error_invalid_backup, 'error');
                    
91		admin_redirect("index.php?module=tools-backupdb");
                    
92	}
                    
98	{
                    
99		admin_redirect("index.php?module=tools-backupdb");
                    
100	}
                    
                
sql.inc.php https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework | PHP | 238 lines
                    
1<?php
                    
2if (!$error && $_POST["export"]) {
                    
27		), "rb");
                    
28		$query = ($fp ? fread($fp, 1e6) : false);
                    
29	} else {
                    
32
                    
33	if (is_string($query)) { // get_file() returns error as number, fread() as false
                    
34		if (function_exists('memory_get_usage')) {
                    
72				if (!$found && $fp && !feof($fp)) {
                    
73					$query .= fread($fp, 1e5);
                    
74				} else {
                    
83							if (!$s && $fp && !feof($fp)) {
                    
84								$query .= fread($fp, 1e5);
                    
85							} else {
                    
186<form action="" method="post" enctype="multipart/form-data" id="form">
                    
187<?php
                    
188$execute = "<input type='submit' value='" . lang('Execute') . "' title='Ctrl+Enter'>";
                    
                
File.php https://gitlab.com/RonLab1987/YupePlusClear | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
                    
21 */
                    
38     */
                    
39    abstract protected function _fread($length = 1);
                    
40
                    
106    {
                    
107        return ord($this->_fread(1));
                    
108    }
                    
128    {
                    
129        return $this->_fread($num);
                    
130    }
                    
151    {
                    
152        $str = $this->_fread(4);
                    
153
                    
                
SCP.php https://gitlab.com/daniruizcamacho/pfcascensores | PHP | 361 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Pure-PHP implementation of SCP.
                    
5 *
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
7 *
                    
8 * The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}.
                    
9 *
                    
11 * <code>
                    
12 * <?php
                    
13 *    include('Net/SCP.php');
                    
13 *    include('Net/SCP.php');
                    
14 *    include('Net/SSH2.php');
                    
15 *
                    
                
theme-editor.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 241 lines
                    
169	<?php if ( $theme->parent() ) : ?>
                    
170	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
171	<?php endif; ?>
                    
186?>
                    
187		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
188<?php
                    
208		<?php echo $docs_select; ?>
                    
209		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
210		</div>
                    
214		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
215			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
216			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
217		<?php endif; ?>
                    
218<?php
                    
219	if ( is_writeable( $file ) ) :
                    
                
CopyeditorSubmissionDAO.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 343 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @file classes/submission/copyeditor/CopyeditorSubmissionDAO.inc.php
                    
5 *
                    
154			ASSOC_TYPE_ARTICLE,
                    
155			'SIGNOFF_PROOFREADING_PROOFREADER',
                    
156			ASSOC_TYPE_ARTICLE,
                    
237				break;
                    
238			case SUBMISSION_FIELD_DATE_PROOFREADING_COMPLETE:
                    
239				if (!empty($dateFrom)) {
                    
                
Openssl.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 353 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Openssl.php 20288 2010-01-14 20:15:43Z thomas $
                    
20 */
                    
24 */
                    
25// require_once 'Zend/Filter/Encrypt/Interface.php';
                    
26
                    
70        if (!extension_loaded('openssl')) {
                    
71            // require_once 'Zend/Filter/Exception.php';
                    
72            throw new Zend_Filter_Exception('This filter needs the openssl extension');
                    
99        if (!is_array($keys)) {
                    
100            // require_once 'Zend/Filter/Exception.php';
                    
101            throw new Zend_Filter_Exception('Invalid options argument provided to filter');
                    
106                $file = fopen($key, 'r');
                    
107                $cert = fread($file, 8192);
                    
108                fclose($file);
                    
                
Cache.php https://github.com/abirmmu/codeigniter-cache.git | PHP | 431 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
212		{
                    
213			$this->_contents = unserialize(fread($fp, filesize($filepath)));
                    
214		}
                    
301			{
                    
302				// create non existing dirs, asumes PHP5
                    
303				if ( ! @mkdir($test_path, DIR_WRITE_MODE, TRUE)) return FALSE;
                    
429
                    
430/* End of file Cache.php */
                    
431/* Location: ./application/libraries/Cache.php */
                    
                
mail.php https://gitlab.com/2202Programming/navxmxp | PHP | 406 lines
                    
1<?php
                    
2class Mail {
                    
95		$header .= 'Return-Path: ' . $this->from . $this->newline;
                    
96		$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
                    
97		$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
                    
127				
                    
128				$content = fread($handle, filesize($attachment));
                    
129				
                    
158			} else {
                    
159				if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
160					socket_set_timeout($handle, $this->timeout, 0);
                    
358					foreach ($results as $result) {
                    
359						if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
360							fputs($handle, $result . $this->crlf);
                    
                
form-process.php https://github.com/ngacharts/opencpn.info.git | PHP | 204 lines
                    
1<?php
                    
2session_start();
                    
58		$handle = fopen( $_FILES['gpx']['tmp_name'], "r");
                    
59		$gpx_str = '\''.mysql_real_escape_string(fread($handle, $_FILES['gpx']['size'])).'\'';
                    
60		fclose($handle);
                    
                
file.php https://github.com/boluak/lifefm-github.git | PHP | 379 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: file.php 10707 2008-08-21 09:52:47Z eddieajau $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7 * @license		GNU/GPL, see LICENSE.php
                    
8 * Joomla! is free software. This version may have been modified pursuant
                    
11 * other free or open source software licenses.
                    
12 * See COPYRIGHT.php for copyright notices and details.
                    
13 */
                    
246			if($amount && $fsize > $amount) {
                    
247				$data = fread($fh, $amount);
                    
248			} else {
                    
248			} else {
                    
249				$data = fread($fh, $fsize);
                    
250			}
                    
                
fileManager.php https://github.com/pheeque/jquery.fileManager.git | PHP | 235 lines
                    
1<?php
                    
2/*
                    
28*
                    
29* Advanced users may wish to write a separate php script to control the
                    
30* ajax features of the File Manager.  Including callbacks for deleting
                    
201					if ($in) {
                    
202						while ($buff = fread($in, 4096))
                    
203							fwrite($out, $buff);
                    
217				// Read binary input stream and append it to temp file
                    
218				$in = fopen("php://input", "rb");
                    
219
                    
220				if ($in) {
                    
221					while ($buff = fread($in, 4096))
                    
222						fwrite($out, $buff);
                    
                
importDump.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 277 lines
                    
1<?php
                    
2/**
                    
24
                    
25require_once( dirname( __FILE__ ) . '/Maintenance.php' );
                    
26
                    
40		parent::__construct();
                    
41		$gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
                    
42		$bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
                    
45This script reads pages from an XML file as produced from Special:Export or
                    
46dumpBackup.php, and saves them into the current wiki.
                    
47
                    
52
                    
53Note that for very large data sets, importDump.php may be slow; there are
                    
54alternate methods which can be much faster for full site restoration:
                    
56TEXT;
                    
57		$this->stderr = fopen( "php://stderr", "wt" );
                    
58		$this->addOption( 'report',
                    
                
after-the-deadline.php https://gitlab.com/endomorphosis/falkenstein | PHP | 286 lines
                    
26 */
                    
27include( 'after-the-deadline/config-options.php' );
                    
28include( 'after-the-deadline/config-unignore.php' );
                    
174		wp_enqueue_script( 'AtD_settings', admin_url() . 'admin-ajax.php?action=atd_settings', array('AtD_jquery'), ATD_VERSION );
                    
175		wp_enqueue_script( 'AtD_autoproofread', plugins_url( '/after-the-deadline/atd-autoproofread.js', __FILE__ ), array('AtD_jquery'), ATD_VERSION );
                    
176
                    
190
                    
191			'button_proofread'            => __( 'proofread', 'jetpack' ),
                    
192			'button_edit_text'            => __( 'edit text', 'jetpack' ),
                    
192			'button_edit_text'            => __( 'edit text', 'jetpack' ),
                    
193			'button_proofread_tooltip'    => __( 'Proofread Writing', 'jetpack' ),
                    
194
                    
252
                    
253	$pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'admin.php', 'profile.php' );
                    
254
                    
                
GenCRC32Section.c https://gitlab.com/envieidoc/Clover | C | 313 lines
                    
6which accompanies this distribution.  The full text of the license may be found at        
                    
7http://opensource.org/licenses/bsd-license.php                                            
                    
8                                                                                          
                    
191
                    
192    fread (&Temp, sizeof (UINT8), 1, InputFile);
                    
193    while (!feof (InputFile)) {
                    
194      (*FileBuffer)[Size++] = Temp;
                    
195      fread (&Temp, sizeof (UINT8), 1, InputFile);
                    
196    }
                    
                
Cache_File.php https://gitlab.com/karlen/ayo_wp | PHP | 455 lines
                    
1<?php
                    
2namespace W3TC;
                    
117		@fputs( $fp, pack( 'L', $expires_at ) );
                    
118		@fputs( $fp, '<?php exit; ?>' );
                    
119		@fputs( $fp, @serialize( $var ) );
                    
164
                    
165		$expires_at = @fread( $fp, 4 );
                    
166		$data = null;
                    
185				while ( !@feof( $fp ) ) {
                    
186					$data .= @fread( $fp, 4096 );
                    
187				}
                    
315
                    
316		$path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );
                    
317
                    
409		@fputs( $fp, pack( 'L', $expires_at ) );
                    
410		@fputs( $fp, '<?php exit; ?>' );
                    
411		@fputs( $fp, (int)$value );
                    
                
chunk.php https://gitlab.com/hschoenburg/tlworks2 | PHP | 392 lines
                    
1<?php
                    
2
                    
2
                    
3include __DIR__ . "/XmlStreamReader/autoload.php";
                    
4
                    
93    while (!@feof($f)) {
                    
94      $chunk = @fread($f, 1024);         
                    
95      if (strpos($chunk, "<!DOCTYPE") === 0) $is_html = true;
                    
234        else
                    
235           $path = 'php://filter/read=preprocessxml/resource=' . $this->file;
                    
236    }
                    
368
                    
369class preprocessXml_filter extends php_user_filter {    
                    
370
                    
                
 

Source

Language