93+ results for 'php feof' (0 ms)
Not the results you expected?
vfsStreamWrapperFileTestCase.php (https://github.com/acoulton/vfsStream.git) PHP · 335 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamWrapper.
9 require_once 'org/bovigo/vfs/vfsStream.php';
10 require_once 'PHPUnit/Framework/TestCase.php';
11 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';
124 $fp = fopen($this->baz1URL, 'r');
125 $this->assertEquals(0, ftell($fp));
126 $this->assertFalse(feof($fp));
127 $this->assertEquals(0, fseek($fp, 2));
128 $this->assertEquals(2, ftell($fp));
131 $this->assertEquals(0, fseek($fp, 1, SEEK_END));
132 $this->assertEquals(6, ftell($fp));
133 $this->assertTrue(feof($fp));
134 $this->assertEquals(0, fseek($fp, 2));
135 $this->assertFalse(feof($fp));
BodyTest.php (https://gitlab.com/leon0399/damnit-engine) PHP · 401 lines
1 <?php
2 /**
3 * Slim Framework (http://slimframework.com)
4 *
5 * @link https://github.com/slimphp/Slim
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
7 * @license https://github.com/slimphp/Slim/blob/master/LICENSE.md (MIT License)
12 use Slim\Http\Body;
14 class BodyTest extends \PHPUnit_Framework_TestCase
15 {
16 /**
41 public function resourceFactory($mode = 'r+')
42 {
43 $stream = fopen('php://temp', $mode);
44 fwrite($stream, $this->text);
45 rewind($stream);
test_ext_network.cpp (https://github.com/tmjnaid/hiphop-php.git) C++ · 266 lines
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
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 +----------------------------------------------------------------------+
15 */
AsyncStream.php (https://github.com/Erika31/phpdaemon.git) PHP · 524 lines
Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines
1 <?php
2 namespace W3TC;
116 $expires_at = time() + $expire;
117 @fputs( $fp, pack( 'L', $expires_at ) );
118 @fputs( $fp, '<?php exit; ?>' );
119 @fputs( $fp, @serialize( $var ) );
120 @fclose( $fp );
183 $data = '';
185 while ( !@feof( $fp ) ) {
186 $data .= @fread( $fp, 4096 );
187 }
314 $hash = md5( $key );
316 $path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );
318 return $path;
Stream.php (https://gitlab.com/ealexis.t/trends) PHP · 245 lines
class-ai1wm-extractor.php (https://gitlab.com/haque.mdmanzurul/roadskill) PHP · 296 lines
1 <?php
3 /**
84 if ( $block === $this->eof ) {
85 // we reached end of file, set the pointer to the end of the file so that feof returns true
86 @fseek( $this->file_handle, 1, SEEK_END );
87 @fgetc( $this->file_handle );
145 // that means the files don't exist in the archive
146 if ( $block === $this->eof ) {
147 // we reached end of file, set the pointer to the end of the file so that feof returns true
148 @fseek( $this->file_handle, 1, SEEK_END );
149 @fgetc( $this->file_handle );
277 */
278 public function has_not_reached_eof() {
279 return ! feof( $this->file_handle );
280 }
File.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
231 protected function _eof()
232 {
233 return feof($this->_fileHandler);
234 }
Stream.php (https://gitlab.com/reasonat/test8) PHP · 328 lines
File.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 204 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
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 */
29 /** Zend_Pdf_FileParserDataSource */
30 require_once 'Zend/Pdf/FileParserDataSource.php';
82 {
83 if (! (is_file($filePath) || is_link($filePath))) {
84 require_once 'Zend/Pdf/Exception.php';
85 throw new Pdf\Exception("Invalid file path: $filePath",
86 Pdf\Exception::BAD_FILE_PATH);
update_check.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 107 lines
File.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
231 protected function _eof()
232 {
233 return feof($this->_fileHandler);
234 }
LoadFreenectData.m (https://gitlab.com/anima_tcs/kinectcapture) Objective C · 205 lines
File.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 198 lines
1 <?php
2 /**
3 * Zend Framework
23 /** Zend_Pdf_FileParserDataSource */
24 #require_once 'Zend/Pdf/FileParserDataSource.php';
76 {
77 if (! (is_file($filePath) || is_link($filePath))) {
78 #require_once 'Zend/Pdf/Exception.php';
79 throw new Zend_Pdf_Exception("Invalid file path: $filePath",
80 Zend_Pdf_Exception::BAD_FILE_PATH);
81 }
82 if (! is_readable($filePath)) {
83 #require_once 'Zend/Pdf/Exception.php';
84 throw new Zend_Pdf_Exception("File is not readable: $filePath",
85 Zend_Pdf_Exception::NOT_READABLE);
mailtrafficlib.php (https://bitbucket.org/Nemcio/kloxo-mr.git) PHP · 183 lines
smarty_internal_data.php (https://gitlab.com/mike_tm555/batiste) PHP · 404 lines
PHPTemp.php (https://gitlab.com/tonmoy1a/bitm-php-batch-26) PHP · 206 lines
22 * @package PHPExcel_CachedObjectStorage
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
29 /**
30 * PHPExcel_CachedObjectStorage_PHPTemp
31 *
32 * @category PHPExcel
34 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {
38 /**
77 *
78 * @param string $pCoord Coordinate address of the cell to update
79 * @param PHPExcel_Cell $cell Cell to update
80 * @return PHPExcel_Cell
File.php (https://bitbucket.org/jonbiard/nucleus.git) PHP · 233 lines
parallel_processing.c (https://bitbucket.org/freebsd/freebsd-base.git) C · 194 lines
15 #include <stdlib.h> // malloc, exit
16 #include <stdio.h> // fprintf, perror, feof
17 #include <string.h> // strerror
18 #include <errno.h> // errno
65 size_t const readSize = fread(buffer, 1, sizeToRead, file);
66 if (readSize == sizeToRead) return readSize; /* good */
67 if (feof(file)) return readSize; /* good, reached end of file */
68 /* error */
69 perror("fread");
function.fetch.php (https://github.com/laurentc/NApf.git) PHP · 216 lines
1 <?php
2 /**
3 * Smarty plugin
13 * Name: fetch<br>
14 * Purpose: fetch common, web or ftp data and display results
15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
16 * (Smarty online manual)
17 * @author Monte Ohrt <monte at ohrt dot com>
36 // fetch the common
37 if ($fp = @fopen($params['common'], 'r')) {
38 while (!feof($fp)) {
39 $content .= fgets($fp, 4096);
40 }
176 fputs($fp, "\r\n");
177 while (!feof($fp)) {
178 $content .= fgets($fp, 4096);
179 }
vnstat.php (https://gitlab.com/billyprice1/QuickBox) PHP · 136 lines
1 <?php
3 // Valid values for other parameters you can pass to the script.
6 // the first parameter in the list.
8 if (isset($_SERVER['PHP_SELF'])) {
9 $script = $_SERVER['PHP_SELF'];
57 $fd = popen("$vnstat_bin --dumpdb -i $iface", "r");
58 $buffer = '';
59 while (!feof($fd)) {
60 $buffer .= fgets($fd);
61 }
mdb_request.class.php (https://github.com/hetwieg/media_hdd.git) PHP · 117 lines
1 <?php
2 #############################################################################
3 # IMDBPHP (c) Giorgos Giagas & Itzchak Rehberg #
10 #############################################################################
12 /* $Id: mdb_request.class.php 429 2010-12-01 16:20:49Z izzy $ */
14 if ( isset($PEAR) && $PEAR ) { // Use the HTTP_Request class from the PEAR project.
15 require_once("HTTP/Request.php");
16 class MDB_Request extends HTTP_Request{
17 function __construct($url){
33 require_once (dirname(__FILE__)."/browseremulator.class.php");
34 if (defined('IMDBPHP_CONFIG')) require_once (IMDBPHP_CONFIG);
35 else require_once (dirname(__FILE__)."/mdb_config.class.php");
base64encode.m (https://github.com/yuval-harpaz/ft_BIU.git) Objective C · 159 lines
group.php (https://bitbucket.org/lvandervelde/vingi.git) PHP · 318 lines
streams.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 209 lines
1 <?php
2 /**
3 * Classes, which help reading streams of data from files.
4 * Based on the classes from Danilo Segan <danilo@kvota.net>
5 *
6 * @version $Id: streams.php 597 2011-01-16 20:14:36Z nbachiyski $
7 * @package pomo
8 * @subpackage streams
126 }
128 function feof() {
129 return feof($this->_f);
136 function read_all() {
137 $all = '';
138 while ( !$this->feof() )
139 $all .= $this->read(4096);
140 return $all;
FS.php (https://github.com/bouthors/gallery3-contrib.git) PHP · 180 lines
1 <?php
3 /**
4 * The Lock manager allows you to handle all file-locks centrally.
5 *
6 * This Lock Manager stores all its data in the filesystem. By default it will do this in PHP's standard temporary session directory,
7 * but this can be overriden by specifiying an alternative path in the contructor
8 *
142 // Reading data until the eof
143 while(!feof($handle)) {
144 $data.=fread($handle,8192);
145 }
File.php (https://github.com/figshare/science3point0.git) PHP · 237 lines
Maildir.php (https://github.com/bhaumik25/zend-framework.git) PHP · 222 lines
File.php (https://bitbucket.org/rybadour/todo_list_site.git) PHP · 241 lines
1 <?php defined('SYSPATH') OR die('No direct script access.');
2 /**
3 * File helper class.
13 /**
14 * Attempt to get the mime type from a file. This method is horribly
15 * unreliable, due to PHP being horribly unreliable when it comes to
16 * determining the mime type of a file.
17 *
67 * $mime = File::mime_by_ext('png'); // "image/png"
68 *
69 * @param string $extension php, pdf, txt, etc
70 * @return string mime type on success
71 * @return FALSE on failure
167 $pieces = 0;
169 while ( ! feof($file))
170 {
171 // Create another piece
Jpeg.php (https://github.com/kervin/kyzstudio.git) PHP · 152 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Jpeg.php 23395 2010-11-19 15:30:47Z alexander $
20 */
23 /** Internally used classes */
24 #require_once 'Zend/Pdf/Element/Name.php';
25 #require_once 'Zend/Pdf/Element/Numeric.php';
28 /** Zend_Pdf_Resource_Image */
29 #require_once 'Zend/Pdf/Resource/Image.php';
31 /**
Reader.php (https://gitlab.com/mmerian/csv.git) PHP · 429 lines
vfsStreamWrapperFileTestCase.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 457 lines
1 <?php
2 /**
3 * This file is part of vfsStream.
9 */
10 namespace org\bovigo\vfs;
11 require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
12 /**
13 * Test for org\bovigo\vfs\vfsStreamWrapper.
121 $fp = fopen($this->baz1URL, 'r');
122 $this->assertEquals(0, ftell($fp));
123 $this->assertFalse(feof($fp));
124 $this->assertEquals(0, fseek($fp, 2));
125 $this->assertEquals(2, ftell($fp));
128 $this->assertEquals(0, fseek($fp, 1, SEEK_END));
129 $this->assertEquals(6, ftell($fp));
130 $this->assertTrue(feof($fp));
131 $this->assertEquals(0, fseek($fp, 2));
132 $this->assertFalse(feof($fp));
cake_socket.php (https://github.com/cgajardo/repositorium.git) PHP · 304 lines
1 <?php
2 /**
3 * Cake Socket connection class.
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.cake.libs
17 * @since CakePHP(tm) v 1.2.0
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
FileByteStream.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 229 lines
1 <?php
3 /*
83 {
84 $fp = $this->_getReadHandle();
85 if (!feof($fp)) {
86 if ($this->_quotes) {
87 ini_set('magic_quotes_runtime', 0);
95 // If we read one byte after reaching the end of the file
96 // feof() will return false and an empty string is returned
97 if ($bytes === '' && feof($fp)) {
206 private function _copyReadStream()
207 {
208 if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) {
209 /* We have opened a php:// Stream Should work without problem */
ods.php (https://bitbucket.org/dreamriks/gift.git) PHP · 193 lines
1 <?php
2 /**
3 * XML parser for ODS files
11 * @copyright Copyright (C) 2006 - 2012 RolandD Cyber Produksi
12 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
13 * @version $Id: ods.php 754 2009-02-14 10:53:32Z Suami $
14 *
15 * @todo add support for zip file
64 }
65 $data = '';
66 while (!feof($fp)) {
67 $data .= fread($fp, 4096);
68 }
op-alpha.php (https://github.com/micheleberg/Calontir-OP.git) PHP · 186 lines
checkInputXFiles.php (https://github.com/MengZhang/dssat-xfile-upload.git) PHP · 137 lines
1 <?php
2 include("parts_checkSession.php");
3 include("function.php");
4 include("dbTempUpdate.php");
26 $file = fopen($_FILES["FilePath"]["tmp_name"],"r") or exit("Unable to open file!");
28 while(!feof($file)) {
29 $lineNo++;
30 $line = fgets($file);
61 $_SESSION["dssat_steps"] = 2;
62 }
63 $target = "inputFiles02.php";
65 // Check if weather data is avaliable in DB
platform_posix.c (https://github.com/nmacherey/rheia.git) C · 249 lines
SafeStream.php (https://github.com/langpavel/nette.git) PHP · 309 lines
1 <?php
3 /**
191 fclose($this->tempHandle);
193 if ($this->writeError /*5.2*|| !(substr(PHP_OS, 0, 3) === 'WIN' ? unlink($this->file) : TRUE)*/
194 || !rename($this->tempFile, $this->file) // try to rename temp file
195 ) {
251 public function stream_eof()
252 {
253 return feof($this->tempHandle);
254 }
MailImageParser.php (https://github.com/Koc/core.git) PHP · 215 lines
1 <?php
2 // vim: set ts=4 sw=4 sts=4 et:
10 * that is bundled with this package in the file LICENSE.txt.
11 * It is also available through the world-wide-web at this URL:
12 * http://opensource.org/licenses/osl-3.0.php
13 * If you did not receive a copy of the license and are unable to
14 * obtain it through the world-wide-web, please send an email
15 * to licensing@litecommerce.com so we can send you a copy immediately.
16 *
17 * PHP version 5.3.0
18 *
19 * @category LiteCommerce
20 * @author Creative Development LLC <info@cdev.ru>
21 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved
22 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23 * @link http://www.litecommerce.com/
24 * @see ____file_see____
Process.hx (https://github.com/blackdog66/bdog-haxe.git) Haxe · 140 lines
23 * DAMAGE.
24 */
25 package php.io;
27 private class Stdin extends haxe.io.Output {
46 public override function writeBytes( b : haxe.io.Bytes, pos : Int, l : Int ) : Int {
47 var s = b.readString(pos, l);
48 if(untyped __call__('feof', p)) return throw new haxe.io.Eof();
49 var r = untyped __call__('fwrite', p, s, l);
50 if(untyped __physeq__(r, false)) return throw haxe.io.Error.Custom('An error occurred');
70 public override function readBytes( str : haxe.io.Bytes, pos : Int, l : Int ) : Int {
71 if(untyped __call__('feof', p)) return throw new haxe.io.Eof();
72 var r : String = untyped __call__('fread', p, l);
73 if(untyped __physeq__(r, "")) return throw new haxe.io.Eof();
bloxx_rssdisplay.php (https://github.com/telmomenezes/bloxx.git) PHP · 158 lines
1 <?php
2 // Bloxx - Open Source Content Management System
3 //
20 // Authors: Telmo Menezes <telmo@cognitiva.net>
21 //
22 // $Id: bloxx_rssdisplay.php,v 1.6 2005-08-08 16:38:35 tmenezes Exp $
24 require_once 'defines.php';
25 require_once(CORE_DIR.'bloxx_module.php');
27 class Bloxx_RssDisplay extends Bloxx_Module
83 while ($data = fread($fp, 4096)) {
85 if (!xml_parse($parser, $data, feof($fp))) {
86 die(sprintf("XML error: %s at line %d",
87 xml_error_string(xml_get_error_code($parser)),
Statement.php (https://github.com/doctrine/dbal.git) PHP · 202 lines
LogTarget.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 183 lines
SConfig.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 195 lines
streams.php (https://github.com/muskmelon/Greemo.git) PHP · 209 lines
1 <?php
2 /**
3 * Classes, which help reading streams of data from files.
4 * Based on the classes from Danilo Segan <danilo@kvota.net>
5 *
6 * @version $Id: streams.php 406 2010-02-07 11:10:24Z nbachiyski $
7 * @package pomo
8 * @subpackage streams
126 }
128 function feof() {
129 return feof($this->_f);
136 function read_all() {
137 $all = '';
138 while ( !$this->feof() )
139 $all .= $this->read(4096);
140 return $all;
paypal_ipn.php (https://gitlab.com/zohaibsaleem/shipcliq) PHP · 104 lines
1 <?php
2 // Send an empty HTTP 200 OK response to acknowledge receipt of the notification
3 header('HTTP/1.1 200 OK');
33 fputs($fp, $header . $req);
35 while (!feof($fp)) { // While not EOF
36 $res = fgets($fp, 1024); // Get the acknowledgement response
37 if (strcmp ($res, "VERIFIED") == 0) { // Response contains VERIFIED - process notification
class-wp-filesystem-ftpsockets.php (https://github.com/paatsinsuwan/WPOliversarris.git) PHP · 327 lines
1 <?php
2 /**
3 * WordPress FTP Sockets Filesystem.
26 //Check if possible to use ftp functions.
27 if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
28 return false;
29 $this->ftp = new ftp();
104 $contents = '';
106 while ( ! feof($temphandle) )
107 $contents .= fread($temphandle, 8192);
ArrayCharacterStream.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 317 lines
Filesystem.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 237 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Filesystem.php 23395 2010-11-19 15:30:47Z alexander $
21 */
29 /** Zend_Search_Lucene_Storage_File */
30 require_once 'Zend/Search/Lucene/Storage/File.php';
32 /**
55 public function __construct($filename, $mode='r+b')
56 {
57 global $php_errormsg;
59 if (strpos($mode, 'w') === false && !is_readable($filename)) {
demo.zip.php (https://github.com/KenBoyer/CompactCMS.git) PHP · 79 lines
1 <?php
2 /////////////////////////////////////////////////////////////////
3 /// getID3() by James Heinrich <info@getid3.org> //
6 /////////////////////////////////////////////////////////////////
7 // //
8 // /demo/demo.zip.php - part of getID3() //
9 // Sample script how to use getID3() to decompress zip files //
10 // See readme.txt for more details //
16 $errors = array();
17 $DecompressedFileContents = array();
18 if (include_once('getid3.module.archive.zip.php')) {
19 ob_start();
20 if ($fp_ziptemp = fopen($filename, 'rb')) {
41 fseek($fp_ziptemp, $LocalFileHeader['data_offset'], SEEK_SET);
42 $compressedFileData = '';
43 while ((strlen($compressedFileData) < $LocalFileHeader['compressed_size']) && !feof($fp_ziptemp)) {
44 $compressedFileData .= fread($fp_ziptemp, 4096);
45 }
Node.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 214 lines
1 <?php
3 namespace SabreForRainLoop\DAV\FSExt;
98 // Reading data until the eof
99 while(!feof($handle)) {
100 $data.=fread($handle,8192);
101 }
135 // Reading data until the eof
136 while(!feof($handle)) {
137 $data.=fread($handle,8192);
138 }
191 // Reading data until the eof
192 while(!feof($handle)) {
193 $data.=fread($handle,8192);
194 }
File.php (https://gitlab.com/staging06/myproject) PHP · 208 lines
1 <?php
3 /**
10 */
12 require_once dirname(__FILE__) . "/ClassLoader.php";
13 Swift_ClassLoader::load("Swift_FileException");
37 protected $handle = null;
38 /**
39 * The status of magic_quotes in php.ini
40 * @var boolean
41 */
113 {
114 $this->createHandle();
115 return feof($this->handle);
116 }
117 /**
convertImageProductionTest.php (https://github.com/richhl/kalturaCE.git) PHP · 110 lines
1 <?php
3 require_once 'convertImageTester.php';
4 require_once 'bootstrap.php';
6 /**
34 die ('unable to read tests file [' . $testsFile . ']');
35 fgets($fileHundler); // discard form header line
36 while (!feof($fileHundler)) {
37 $line = fgets($fileHundler);
38 $line = explode("\t", $line);
82 if ($status === false)
83 echo 'unable to convert [' . $tester->getSourceFile() . '] with parameterrs: ' .
84 print_r($tester->getParams()) . PHP_EOL;
85 // assert(true === $status);
File.php (https://github.com/Nerutiz/trades.git) PHP · 198 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $
20 */
24 * @see Zend_Mime_Decode
25 */
26 require_once 'Zend/Mime/Decode.php';
28 /**
29 * @see Zend_Mail_Part
30 */
31 require_once 'Zend/Mail/Part.php';
Converter.php (https://github.com/Anakeen/development-tools.git) PHP · 238 lines
1 <?php
3 namespace Dcp\DevTools\Ods;
105 }
106 $content = "";
107 while (!feof($contentFile)) {
108 $content .= fread($contentFile, 2);
109 }
135 /* Handling method for XML parser*/
136 protected function startElement(
137 /** @noinspection PhpUnusedParameterInspection */
138 $parser, $name, $attrs)
139 {
143 // fill empty cells
144 $idx = 0;
145 /** @noinspection PhpUnusedLocalVariableInspection */
146 foreach ($this->rows[$this->nrows] as & $v) {
147 if (!isset($this->rows[$this->nrows][$idx])) {
DiskKeyCache.php (https://gitlab.com/techniconline/kmc) PHP · 323 lines
update.php (https://github.com/jywarren/whooz.git) PHP · 173 lines
1 <?php
2 /**
3 * A simple set of functions to check our version 1.0 update service
10 * wp_version_check() - Check WordPress version against the newest version.
11 *
12 * The WordPress version, PHP version, and Locale is sent. Checks against the WordPress server at
13 * api.wordpress.org. Will only check if PHP has fsockopen enabled and WordPress isn't installing.
25 global $wp_version;
26 $php_version = phpversion();
28 $current = get_option( 'update_core' );
40 $new_option->version_checked = $wp_version;
42 $http_request = "GET /core/version-check/1.1/?version=$wp_version&php=$php_version&locale=$locale HTTP/1.0\r\n";
43 $http_request .= "Host: api.wordpress.org\r\n";
44 $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . get_option('blog_charset') . "\r\n";
libc.rb (https://github.com/postmodern/ffi-libc.git) Ruby · 220 lines
Http.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 87 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Dataflow
23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>
43 </form>
44 <?php
45 exit;
46 }
Http.php (https://github.com/rgranadino/magento-mirror.git) PHP · 87 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Dataflow
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>
43 </form>
44 <?php
45 exit;
46 }
function.fetch.php (https://gitlab.com/flyhope/Hiblog) PHP · 221 lines
1 <?php
2 /**
3 * Smarty plugin
13 * Purpose: fetch file, web or ftp data and display results
14 *
15 * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch}
16 * (Smarty online manual)
17 * @author Monte Ohrt <monte at ohrt dot com>
43 if (isset($template->smarty->security_policy)) {
44 if ($protocol) {
45 // remote resource (or php stream, …)
46 if (!$template->smarty->security_policy->isTrustedUri($params['file'])) {
47 return;
191 fputs($fp, "\r\n");
192 while (!feof($fp)) {
193 $content .= fgets($fp, 4096);
194 }
socket.php (https://github.com/castlino/linonico.com.git) PHP · 281 lines
1 <?php
2 /* SVN FILE: $Id: socket.php 7945 2008-12-19 02:16:01Z gwoo $ */
6 * PHP versions 4 and 5
7 *
8 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
9 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
10 *
14 * @filesource
15 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
16 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
17 * @package cake
18 * @subpackage cake.cake.libs
19 * @since CakePHP(tm) v 1.2.0
20 * @version $Revision: 7945 $
21 * @modifiedby $LastChangedBy: gwoo $
function.fclose.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 99 lines
8 <body><div class="manualnavbar" style="text-align: center;">
9 <div class="prev" style="text-align: left; float: left;"><a href="function.diskfreespace.html">diskfreespace</a></div>
10 <div class="next" style="text-align: right; float: right;"><a href="function.feof.html">feof</a></div>
11 <div class="up"><a href="ref.filesystem.html">ファイルシステム 関数</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
14 <div class="refnamediv">
15 <h1 class="refname">fclose</h1>
16 <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">fclose</span> — <span class="dc-title">オープンされたファイルポインタをクローズする</span></p>
18 </div>
94 </div><hr /><div class="manualnavbar" style="text-align: center;">
95 <div class="prev" style="text-align: left; float: left;"><a href="function.diskfreespace.html">diskfreespace</a></div>
96 <div class="next" style="text-align: right; float: right;"><a href="function.feof.html">feof</a></div>
97 <div class="up"><a href="ref.filesystem.html">ファイルシステム 関数</a></div>
98 <div class="home"><a href="index.html">PHP Manual</a></div>
Cache.php (https://github.com/livinglab/openlab.git) PHP · 262 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
7 * is slow (HTTP, FTP...), but will need more IO if the file is only extracted
8 *
9 * PHP versions 4 and 5
10 *
11 * This library is free software; you can redistribute it and/or
25 * @category File Formats
26 * @package File_Archive
27 * @author Vincent Lascaux <vincentlascaux@php.net>
28 * @copyright 1997-2005 The PHP Group
29 * @license http://www.gnu.org/copyleft/lesser.html LGPL
30 * @version CVS: $Id$
31 * @link http://pear.php.net/package/File_Archive
32 */
Http.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 87 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Dataflow
23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
42 File to upload: <input type="file" name="io_file"/> <input type="submit" value="Upload"/>
43 </form>
44 <?php
45 exit;
46 }
AbstractEntityBodyDecorator.php (https://github.com/ivebeenlinuxed/Boiler.git) PHP · 221 lines
Voxel_Reader.cxx (https://github.com/jehc/MondocosmOS.git) C++ · 527 lines
171 {
172 Standard_Integer i1 = 0, i2 = 0, value = 0;
173 while (!feof(f))
174 {
175 fgets(line, 64, f);
248 {
249 Standard_Integer i1 = 0, i2 = 0, value = 0;
250 while (!feof(f))
251 {
252 fgets(line, 64, f);
326 Standard_Integer i1 = 0, i2 = 0;
327 Standard_ShortReal value = 0.0;
328 while (!feof(f))
329 {
330 fgets(line, 64, f);
FileByteStream.php (https://gitlab.com/dsasmita/talita-shop) PHP · 233 lines
1 <?php
3 /*
85 {
86 $fp = $this->_getReadHandle();
87 if (!feof($fp)) {
88 if ($this->_quotes) {
89 ini_set('magic_quotes_runtime', 0);
97 // If we read one byte after reaching the end of the file
98 // feof() will return false and an empty string is returned
99 if ($bytes === '' && feof($fp)) {
210 private function _copyReadStream()
211 {
212 if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) {
213 /* We have opened a php:// Stream Should work without problem */
StreamBuffer.php (https://github.com/WPsites/WPide.git) PHP · 176 lines
Tiarra.php (https://github.com/tyoro/tiarraMetro.git) PHP · 253 lines
1 <?php
2 /**
3 * Net_Socket_Tiarra
5 * Using socket of tiarra to send message.
6 *
7 * PHP version 5
8 *
9 * The MIT License
26 * @license http://openpear.org/package/Net_Socket_Tiarra
27 * @version SVN: $Id$
28 * @link http://pear.php.net/package/Net_Socket_Tiarra
29 */
32 require_once 'Net/Socket/Tiarra/Exception.php';
34 /**
ArrayCharacterStream.php (https://gitlab.com/techniconline/kmc) PHP · 294 lines
1 <?php
3 /*
191 $startLength = $this->_charReader->getInitialByteSize();
193 $fp = fopen('php://memory', 'w+b');
194 fwrite($fp, $chars);
195 unset($chars);
270 private function _reloadBuffer($fp, $len)
271 {
272 if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) {
273 $buf = array();
274 for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
ConfigParser.inc.php (https://github.com/ojsde/pkp-lib.git) PHP · 217 lines
1 <?php
3 /**
4 * @file classes/config/ConfigParser.inc.php
5 *
6 * Copyright (c) 2000-2012 John Willinsky
10 * @ingroup config
11 *
12 * @brief Class for parsing and modifying php.ini style configuration files.
13 */
27 /**
28 * Read a configuration file into a multidimensional array.
29 * This is a replacement for the PHP parse_ini_file function, which does not type setting values.
30 * @param $file string full path to the config file
31 * @return array the configuration data (same format as http://php.net/parse_ini_file)
install.copy.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 201 lines
5 // copydirr.inc.php
6 /*
7 http://de3.php.net/manual/de/function.copy.php#55130
8 26.07.2005
9 Author: Anton Makarenko
88 * Replace file_get_contents()
89 *
90 * @category PHP
91 * @package PHP_Compat
96 * @since PHP 5
97 * @require PHP 4.0.1 (trigger_error)
98 */
99 if (!function_exists('file_get_contents')) {
133 * @category PHP
134 * @package PHP_Compat
135 * @link http://php.net/function.file_put_contents
mlog.php (https://github.com/yayv/tinycake.git) PHP · 369 lines
1 <?php
3 class mlog extends model
29 public function parseFile($file, $urlpatterns4merge=false)
30 {
31 require_once('mlogsection.php');
33 $log = new mlogsection();
36 if($fp)
37 while(!feof($fp))
38 {
39 $line = fgets($fp);
194 {
195 $fp = fopen($filename, 'w');
196 fwrite($fp, "<?php\n");
198 $dump = '$this->_badcalls = ' . var_export($this->_badcalls, true). ";\n";
Cache.php (https://github.com/grandison/budo16.git) PHP · 262 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
7 * is slow (HTTP, FTP...), but will need more IO if the file is only extracted
8 *
9 * PHP versions 4 and 5
10 *
11 * This library is free software; you can redistribute it and/or
25 * @category File Formats
26 * @package File_Archive
27 * @author Vincent Lascaux <vincentlascaux@php.net>
28 * @copyright 1997-2005 The PHP Group
29 * @license http://www.gnu.org/copyleft/lesser.html LGPL
30 * @version CVS: $Id: Cache.php,v 1.1 2005/07/07 12:24:58 vincentlascaux Exp $
31 * @link http://pear.php.net/package/File_Archive
Reader.php (https://bitbucket.org/vectorbase/vectorbase.git) PHP · 220 lines
File.php (https://github.com/snippet/zf2.git) PHP · 177 lines
shell.c (https://github.com/Warlockk/radare2.git) C · 313 lines
MY_remote.php (https://github.com/yamamoto123/Ushahidi_Web.git) PHP · 240 lines
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Remote url helper, extends generic remote_Core
5 * @package Core
6 * @author zextra <zextra@gmail.com>
7 * @license http://kohanaphp.com/license.html
8 */
9 class remote extends remote_Core {
118 $response = '';
120 while ( ! feof($remote))
121 {
122 // Get 1K from buffer
lxguardincludelib.php (https://bitbucket.org/Nemcio/kloxo-mr.git) PHP · 154 lines
remote.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 62 lines
1 <?php
2 /**
3 * @package EasyBlog
4 * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
5 * @license GNU/GPL, see LICENSE.php
6 *
7 * EasyBlog is free software. This version may have been modified pursuant
9 * is derivative of works licensed under the GNU General Public License or
10 * other free or open source software licenses.
11 * See COPYRIGHT.php for copyright notices and details.
12 */
13 defined('_JEXEC') or die('Restricted access');
54 $response = "";
55 while (!feof($s)) {
56 $response .= fgets($s);
57 }
tracefile-analyser.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 207 lines
1 <?php
41 function showUsage()
42 {
43 echo "usage:\n\tphp run-cli tracefile [sortkey] [elements]\n\n";
44 echo "Allowed sortkeys:\n\tcalls, time-inclusive, memory-inclusive, time-own, memory-own\n";
45 die();
92 $read = 0;
94 while ( !feof( $this->handle ) )
95 {
96 $buffer = fgets( $this->handle, 4096 );
spell_lib.php (https://github.com/DarkTerror/MiniManager.git) PHP · 194 lines
1 <?php
93 $temp = '';
94 fwrite($fp, $out);
95 while ($fp && !feof($fp))
96 $temp .= fgets($fp, 4096);
97 fclose($fp);
143 //remove header
144 while ($fp && !feof($fp))
145 {
146 $headerbuffer = fgets($fp, 4096);
166 $img_file = fopen(''.$item_icons.'/'.$aura.'.jpg', 'wb');
167 while (!feof($fp))
168 fwrite($img_file,fgets($fp, 4096));
169 fclose($fp);
XMLImport.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 226 lines
smarty_internal_data.php (https://github.com/hatone/revolution.git) PHP · 454 lines
RGenerator.php (https://bitbucket.org/mxelgin/arch1v.git) PHP · 211 lines
file.php (https://bitbucket.org/alvinpd/monsterninja.git) PHP · 186 lines
1 <?php defined('SYSPATH') or die('No direct access allowed.');
2 /**
3 * File helper class.
7 * @author Kohana Team
8 * @copyright (c) 2007-2009 Kohana Team
9 * @license http://kohanaphp.com/license
10 */
11 class Kohana_File {
13 /**
14 * Attempt to get the mime type from a file. This method is horribly
15 * unreliable, due to PHP being horribly unreliable when it comes to
16 * determining the mime type of a file.
17 *
69 * $mime = File::mime_by_ext('png'); // "image/png"
70 *
71 * @param string extension: php, pdf, txt, etc
72 * @return string mime type on success
73 * @return FALSE on failure
socket.php (https://github.com/geeknbar/projet-tut-site-web.git) PHP · 290 lines
1 <?php
2 /* SVN FILE: $Id$ */
3 /**
6 * PHP versions 4 and 5
7 *
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
9 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 *
13 *
14 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
15 * @link http://cakephp.org CakePHP(tm) Project
16 * @package cake
17 * @subpackage cake.cake.libs
18 * @since CakePHP(tm) v 1.2.0
19 * @version $Revision$
20 * @modifiedby $LastChangedBy$
XmlImportSQLParse.php (https://gitlab.com/najomie/fit-hippie) PHP · 119 lines
pdflib_adapter.cls.php
(https://code.google.com/p/ecartcommerce/)
PHP · 891 lines
✨ Summary
This is a PHP class that generates PDF documents using the DOMPDF library. It provides methods for adding text, images, and other content to pages, as well as handling page layout, margins, and formatting. The class can also be used to stream or output the generated PDF file in various formats, including HTML and binary data.
This is a PHP class that generates PDF documents using the DOMPDF library. It provides methods for adding text, images, and other content to pages, as well as handling page layout, margins, and formatting. The class can also be used to stream or output the generated PDF file in various formats, including HTML and binary data.
1 <?php
2 /**
3 * DOMPDF - PHP5 HTML to PDF renderer
4 *
5 * File: $RCSfile: pdflib_adapter.cls.php,v $
6 * Created on: 2005-02-28
7 *
24 *
25 * Alternatively, you may distribute this software under the terms of the
26 * PHP License, version 3.0 or later. A copy of this license should have
27 * been distributed with this file in the file LICENSE.PHP . If this is not
28 * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
29 *
30 * The latest version of DOMPDF might be available at:
tex.properties
(http://scite-ru.googlecode.com/svn/trunk/)
Properties File · 454 lines
✨ Summary
This properties file defines a set of keyword lists for various programming languages and contexts, including TeX, LaTeX, and context-based markup. It maps file patterns to specific keyword lists, allowing for easy inclusion of language-specific features in text editors and other applications. The file provides a way to standardize and organize keyword definitions across different languages and contexts.
This properties file defines a set of keyword lists for various programming languages and contexts, including TeX, LaTeX, and context-based markup. It maps file patterns to specific keyword lists, allowing for easy inclusion of language-specific features in text editors and other applications. The file provides a way to standardize and organize keyword definitions across different languages and contexts.
test_bug396843.html
(git://github.com/zpao/v8monkey.git)
HTML · 242 lines
✨ Summary
This HTML code tests a Mozilla bug (396843) by verifying that certain elements do not have a node principal, base URI object, or document URI object. It creates various elements and checks their properties using JavaScript, ensuring they meet specific expectations for the bug being tested. The test is run when the page finishes loading.
This HTML code tests a Mozilla bug (396843) by verifying that certain elements do not have a node principal, base URI object, or document URI object. It creates various elements and checks their properties using JavaScript, ensuring they meet specific expectations for the bug being tested. The test is run when the page finishes loading.