100+ results for 'php fwrite'
Not the results you expected?
ArrayCharacterStream.php (https://gitlab.com/nexxuz/phpBMS) PHP · 317 lines
class-wp-filesystem-ftpsockets.php (https://bitbucket.org/zenoalbisser/webkit.git) PHP · 327 lines
1 <?php
2 /**
3 * WordPress FTP Sockets Filesystem.
29 //Check if possible to use ftp functions.
30 if( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
31 return false;
32 $this->ftp = new ftp();
133 }
135 fwrite($temphandle, $contents);
136 fseek($temphandle, 0); //Skip back to the start of the file being written to
class-wp-filesystem-ftpsockets.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) 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();
123 }
125 fwrite($temphandle, $contents);
126 fseek($temphandle, 0); //Skip back to the start of the file being written to
PerformanceCollector.java (https://bitbucket.org/chaos_rom/miui_frameworks.git) Java · 243 lines
39 private Bundle mPerfMeasurement;
40 private Bundle mPerfSnapshot;
41 private PerformanceResultsWriter mPerfWriter;
42 private long mSnapshotCpuTime;
43 private long mSnapshotExecTime;
166 public void addMeasurement(String paramString, float paramFloat)
167 {
168 if (this.mPerfWriter != null)
169 this.mPerfWriter.writeMeasurement(paramString, paramFloat);
172 public void addMeasurement(String paramString, long paramLong)
173 {
174 if (this.mPerfWriter != null)
175 this.mPerfWriter.writeMeasurement(paramString, paramLong);
178 public void addMeasurement(String paramString1, String paramString2)
179 {
180 if (this.mPerfWriter != null)
181 this.mPerfWriter.writeMeasurement(paramString1, paramString2);
PHPTemp.php (https://gitlab.com/marchelo8622/pluslawip) 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 1.8.0, 2014-03-02
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 /**
63 fseek($this->_fileHandle,0,SEEK_END);
64 $offset = ftell($this->_fileHandle);
65 fwrite($this->_fileHandle, serialize($this->_currentObject));
66 $this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
67 'sz' => ftell($this->_fileHandle) - $offset
LoggerAppenderSocket.php (https://github.com/samar-tmr/MyVenture.git) PHP · 263 lines
1 <?php
2 /**
3 * Licensed to the Apache Software Foundation (ASF) under one or more
16 * limitations under the License.
17 *
18 * @package log4php
19 */
30 * - timeout - Sets the timeout in ms
31 * - useXml - true, if xml should be transmitted.
32 * false, if a serialized php object should be transmitted
33 *
34 * Parameters are {@link $remoteHost}, {@link $port}, {@link $timeout},
37 * An example:
38 *
39 * {@example ../../examples/php/appender_socket.php 19}
40 *
41 * {@example ../../examples/resources/appender_socket.properties 18}
Csv.php (https://bitbucket.org/moodle/moodle.git) PHP · 404 lines
1 <?php
3 namespace PhpOffice\PhpSpreadsheet\Writer;
5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
6 use PhpOffice\PhpSpreadsheet\Spreadsheet;
8 class Csv extends BaseWriter
9 {
10 /**
11 * PhpSpreadsheet object.
12 *
13 * @var Spreadsheet
34 * @var string
35 */
36 private $lineEnding = PHP_EOL;
38 /**
PdfPageEvent.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 183 lines
107 * @param paragraphPosition the position the paragraph will be written to
108 */
109 public void onParagraph(PdfWriter writer, Document document, float paragraphPosition);
111 /**
156 * @param title the title of the section
157 */
158 public void onSection(PdfWriter writer,Document document,float paragraphPosition, int depth, Paragraph title);
160 /**
167 * @param paragraphPosition the position the section will be written to
168 */
169 public void onSectionEnd(PdfWriter writer,Document document,float paragraphPosition);
171 /**
DOMTraverserTest.php (https://bitbucket.org/mkalkbrenner/querypath.git) PHP · 357 lines
php.php (https://github.com/agallou/atoum.git) PHP · 245 lines
45 ->if($php->addOption($option2 = uniqid(), $option2Value = uniqid() . ' ' . uniqid()))
46 ->then
47 ->castToString($php)->isEqualTo(escapeshellcmd($php->getBinaryPath() . ' ' . $option1 . ' ' . $option2 . ' ' . $option2Value))
48 ->if($php->addArgument($argument1 = uniqid()))
95 ->if($adapter->defined = function($constant) { return ($constant == 'PHP_BINARY'); })
96 ->and($adapter->constant = function($constant) use (& $phpBinary) { return ($constant != 'PHP_BINARY' ? null : $phpBinary = uniqid()); })
97 ->then
98 ->object($php->setBinaryPath())->isIdenticalTo($php)
119 ->string($php->getBinaryPath())->isEqualTo($phpBinPath)
120 ->if($adapter->constant = function($constant) use (& $phpBinDir) { return ($constant != 'PHP_BINDIR' ? null : $phpBinDir = uniqid()); })
121 ->and($adapter->getenv = false)
122 ->then
124 ->string($php->getBinaryPath())->isEqualTo($phpBinDir . '/php')
125 ->object($php->setBinaryPath($phpPath = uniqid()))->isIdenticalTo($php)
126 ->string($php->getBinaryPath())->isEqualTo($phpPath)
156 ->array($php->getArguments())->isEqualTo(array(array($argument1 => null)))
157 ->object($php->addArgument($argument1))->isIdenticalTo($php)
158 ->array($php->getArguments())->isEqualTo(array(array($argument1 => null), array($argument1 => null)))
SafeStream.php (https://github.com/simekadam/bzukotbook.git) PHP · 287 lines
ftrScanAPI_Ex.c (https://github.com/metaperl/vcpaste.git) C · 178 lines
81 return -1;
82 }
83 //fwrite( (void *)&bmfHeader, 1, sizeof(BITMAPFILEHEADER), fp );
84 fwrite( (void *)&bmfHeader.bfType, sizeof(unsigned short int), 1, fp );
85 fwrite( (void *)&bmfHeader.bfSize, sizeof(unsigned int), 1, fp );
86 fwrite( (void *)&bmfHeader.bfReserved1, sizeof(unsigned short int), 1, fp );
87 fwrite( (void *)&bmfHeader.bfReserved2, sizeof(unsigned short int), 1, fp );
88 fwrite( (void *)&bmfHeader.bfOffBits, sizeof(unsigned int), 1, fp );
89 //fwrite( (void *)pDIBHeader, 1, sizeof( BITMAPINFO ) + sizeof( RGBQUAD ) * 255, fp );
90 fwrite( (void *)&pDIBHeader->bmiHeader.biSize, sizeof(unsigned int), 1, fp);
91 fwrite( (void *)&pDIBHeader->bmiHeader.biWidth, sizeof(int), 1, fp);
92 fwrite( (void *)&pDIBHeader->bmiHeader.biHeight, sizeof(int), 1, fp);
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
UploadFromUrl.php (https://github.com/sowawa/mediawiki-svn.git) PHP · 243 lines
File.php (https://github.com/Zefiryn/graduationprojects.git) PHP · 442 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 require_once "Zend/OpenId/Provider/Storage.php";
29 /**
117 }
118 $data = serialize(array($handle, $macFunc, $secret, $expires));
119 fwrite($f, $data);
120 fclose($f);
121 fclose($lock);
Testrunner.php (https://github.com/WhichBrowser/Parser.git) PHP · 244 lines
1 <?php
3 namespace WhichBrowser;
55 if (isset($rule['result'])) {
56 if ($detected->toArray() != $rule['result'] || $detected->toString() != $rule['readable']) {
57 fwrite($fp, "\n{$name}\n--------------\n\n");
59 if ($detected->toString() != $rule['readable']) {
60 fwrite($fp, $rule['readable'] . "\n");
61 fwrite($fp, $detected->toString() . "\n\n");
62 } else {
63 fwrite($fp, $detected->toString() . "\n\n");
64 }
vdso2c.h (https://github.com/srikard/linux.git) C Header · 174 lines
TSocket.php (https://github.com/lenn0x/Milo-Tracing-Framework.git) PHP · 313 lines
1 <?php
2 /*
3 * Licensed to the Apache Software Foundation (ASF) under one
31 /**
32 * Handle to PHP socket
33 *
34 * @var resource
284 }
285 while (mb_strlen($buf,'8bit') > 0) {
286 $got = @fwrite($this->handle_, $buf);
287 if ($got === 0 || $got === FALSE) {
288 $md = stream_get_meta_data($this->handle_);
FileValidatorTest.php (https://github.com/Exercise/symfony.git) PHP · 324 lines
1 <?php
3 /*
17 use Symfony\Component\HttpFoundation\File\UploadedFile;
19 abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase
20 {
21 protected $context;
90 public function testTooLargeBytes()
91 {
92 fwrite($this->file, str_repeat('0', 11));
94 $constraint = new File(array(
110 public function testTooLargeKiloBytes()
111 {
112 fwrite($this->file, str_repeat('0', 1400));
114 $constraint = new File(array(
ZipArchive.php (https://gitlab.com/team_fsn/fsn-php) PHP · 175 lines
22 * @package PHPExcel_Shared_ZipArchive
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 1.8.0, 2014-03-02
29 define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir());
30 }
31 require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php';
34 /**
35 * PHPExcel_Shared_ZipArchive
36 *
37 * @category PHPExcel
38 * @package PHPExcel_Shared_ZipArchive
39 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
40 */
41 class PHPExcel_Shared_ZipArchive
parallel_processing.c (https://github.com/paralect/mongo.git) C · 194 lines
class_writer.php (https://github.com/F5/zetacomponents.git) PHP · 290 lines
1 <?php
2 /**
3 * File containing the ezcDbSchemaPersistentClassWriter class.
27 /**
28 * This handler creates PHP classes to be used with PersistentObject from a
29 * DatabaseSchema.
30 *
117 foreach ( $fields as $fieldName => $field )
118 {
119 fwrite( $file, " /**\n" );
120 fwrite( $file, " * $fieldName\n" );
233 throw new ezcBaseFilePermissionException( $file, ezcBaseFileException::WRITE );
234 }
235 fwrite( $file, "<?php\n" );
236 fwrite( $file, "// Autogenerated class file\n" );
handler_manager.php (https://github.com/F5/zetacomponents.git) PHP · 289 lines
1 <?php
2 /**
3 * File containing the ezcDbSchemaHandlerManager class.
45 */
46 static public $readHandlers = array(
47 'array' => 'ezcDbSchemaPhpArrayReader',
48 'mysql' => 'ezcDbSchemaMysqlReader',
49 'oracle' => 'ezcDbSchemaOracleReader',
62 */
63 static public $writeHandlers = array(
64 'array' => 'ezcDbSchemaPhpArrayWriter',
65 'mysql' => 'ezcDbSchemaMysqlWriter',
66 'oracle' => 'ezcDbSchemaOracleWriter',
80 */
81 static public $diffReadHandlers = array(
82 'array' => 'ezcDbSchemaPhpArrayReader',
83 'xml' => 'ezcDbSchemaXmlReader',
84 );
DebugInfoTest.php (https://gitlab.com/quyse/crashfix) PHP · 209 lines
GenerateGexfGraphCommand.php (https://github.com/erenon/ComPPI.git) PHP · 157 lines
1 <?php
3 namespace Comppi\BuildBundle\Command;
14 {
15 /**
16 * @var Comppi\BuildBundle\Service\GexfWriter\GexfWriter
17 */
18 protected $writer;
46 $container = $this->getContainer();
48 $this->writer = $container->get('comppi.build.gexfWriter');
50 $this->specie = $container
63 // @TODO this hack is required here because of a PDO bug
64 // https://bugs.php.net/bug.php?id=44639
65 $this->connection->getWrappedConnection()
66 ->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
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';
180 file_put_contents($vfsFile, 'test');
181 $fp = fopen($vfsFile, 'ab');
182 fwrite($fp, 'd');
183 fclose($fp);
184 $this->assertEquals('testd', file_get_contents($vfsFile));
194 $vfsFile = vfsStream::url('foo/overwrite.txt');
195 $fp = fopen($vfsFile, 'xb');
196 fwrite($fp, 'test');
197 fclose($fp);
198 $this->assertEquals('test', file_get_contents($vfsFile));
generator.php (https://github.com/jeroendesloovere/forkcms-tools.git) PHP · 297 lines
1 <?php
3 /**
100 {
101 // index action template
102 $modTemplate = CLIPATH . 'module/bases/backend/index.php';
103 $fhModTemplate = fopen($modTemplate, "r");
104 $tdModTemplate = fread($fhModTemplate, filesize($modTemplate));
109 // create index action
110 $modFile = fopen(BACKENDPATH . 'modules/' . $this->module . '/actions/index.php', 'w');
111 fwrite($modFile, $tdModTemplate);
117 // index action template
118 $modTemplate = CLIPATH . 'module/bases/frontend/index.php';
119 $fhModTemplate = fopen($modTemplate, "r");
120 $tdModTemplate = fread($fhModTemplate, filesize($modTemplate));
PdfPageEventForwarder.java (https://github.com/8maki/pdfunlock.git) Java · 284 lines
50 import com.itextpdf.text.Rectangle;
51 import com.itextpdf.text.pdf.PdfPageEvent;
52 import com.itextpdf.text.pdf.PdfWriter;
54 /**
55 * If you want to add more than one page event to a PdfWriter,
56 * you have to construct a PdfPageEventForwarder, add the
57 * different events to this object and add the forwarder to
58 * the PdfWriter.
59 */
test.php (https://github.com/F5/zetacomponents.git) PHP · 297 lines
1 <?php
2 /**
3 *
149 $path = $tempDir . DIRECTORY_SEPARATOR . $value;
150 $fh = fopen( $path, "wb" );
151 fwrite( $fh, "some values" );
152 fclose( $fh );
153 chmod( $path, 0 );
184 $path = $tempDir . DIRECTORY_SEPARATOR . $value;
185 $fh = fopen( $path, "wb" );
186 fwrite( $fh, "some values" );
187 fclose( $fh );
188 chmod( $path, 0 );
Stream.php (https://github.com/bixuehujin/blink.git) PHP · 320 lines
socket.php (https://github.com/h-kanjisan/swiftmailer.git) PHP · 308 lines
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage MockObjects
6 * @version $Id: socket.php 1788 2008-04-27 11:01:59Z pp11 $
7 */
10 * include SimpleTest files
11 */
12 require_once(dirname(__FILE__) . '/compatibility.php');
13 /**#@-*/
15 /**
16 * Stashes an error for later. Useful for constructors
17 * until PHP gets exceptions.
18 * @package SimpleTest
19 * @subpackage WebTester
BodyTest.php (https://github.com/slimphp/Slim-Psr7.git) PHP · 439 lines
1 <?php
3 /**
4 * Slim Framework (https://slimframework.com)
5 *
6 * @license https://github.com/slimphp/Slim-Psr7/blob/master/LICENSE.md (MIT License)
7 */
13 use InvalidArgumentException;
14 use PHPUnit\Framework\TestCase;
15 use ReflectionProperty;
16 use RuntimeException;
23 use function fseek;
24 use function ftell;
25 use function fwrite;
26 use function is_array;
27 use function is_resource;
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);
ArrayCharacterStream.php (https://github.com/itag/TYPO3v4-Core.git) PHP · 319 lines
compiler.c (https://bitbucket.org/adrisr/avm.git) C · 337 lines
PageController.php (https://gitlab.com/stanislav95/subdomains) PHP · 257 lines
1 <?php
2 /**
3 * Created by PhpStorm.
131 foreach ($robotData as $row) {
132 fwrite($file, $row);
133 }
134 fclose($file);
148 $file = fopen($request->server->get('DOCUMENT_ROOT') . '/robots.txt', 'w+');
149 foreach ($robotData as $row) {
150 fwrite($file, $row);
151 }
152 fclose($file);
176 $file = fopen($request->server->get('DOCUMENT_ROOT') . '/' . $domain["domain"] . '/' . 'robots.txt', 'w+');
177 foreach ($robotData as $row) {
178 fwrite($file, $row);
179 }
180 fclose($file);
MyOutputs.php (https://github.com/designsecurity/progpilot.git) PHP · 228 lines
shell.php (https://github.com/joshuaswarren/weatherhub.git) PHP · 162 lines
1 <?php
2 /**
3 * Class used internally by Diff to actually compute the diffs.
6 * differences between the two input arrays.
7 *
8 * $Horde: framework/Text_Diff/Diff/Engine/shell.php,v 1.6.2.3 2008/01/04 10:37:27 jan Exp $
9 *
10 * Copyright 2007-2008 The Horde Project (http://www.horde.org/)
11 *
12 * See the enclosed file COPYING for license information (LGPL). If you did
13 * not receive this file, see http://opensource.org/licenses/lgpl-license.php.
14 *
15 * @author Milian Wolff <mail@milianw.de>
45 $to_file = tempnam($temp_dir, 'Text_Diff');
46 $fp = fopen($from_file, 'w');
47 fwrite($fp, implode("\n", $from_lines));
48 fclose($fp);
49 $fp = fopen($to_file, 'w');
zad.c (git://pkgs.fedoraproject.org/meataxe) C · 270 lines
110 /* Open the output file.
111 --------------------- */
112 Output = FfWriteHeader(App->ArgV[App->ArgC - 1],Field,Nor,Noc);
113 if (Output == NULL)
114 return -1;
188 /* Write the result to the output file.
189 ------------------------------------ */
190 FfWriteRows(Output,Buf1,1);
191 }
192 return 0;
files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines
13 */
15 namespace phpFastCache\Drivers;
17 use phpFastCache\Core\DriverAbstract;
18 use phpFastCache\Exceptions\phpFastCacheDriverException;
20 /**
28 * phpFastCache_files constructor.
29 * @param array $config
30 * @throws phpFastCacheDriverException
31 */
32 public function __construct($config = array())
57 * @param bool $skip
58 * @return string
59 * @throws phpFastCacheDriverException
60 */
61 private function getFilePath($keyword, $skip = false)
Server.php (https://github.com/shevron/aspamia.git) PHP · 288 lines
1 <?php
3 require_once 'Aspamia/Http/Request.php';
4 require_once 'Aspamia/Http/Response.php';
5 require_once 'Aspamia/Http/Server/Handler/Abstract.php';
56 } elseif (is_string($this->_config['handler'])) {
57 require_once 'Zend/Loader.php';
58 Zend_Loader::loadClass($this->_config['handler']);
59 $handler = new $this->_config['handler'];
193 $serverSignature = 'Aspamia/' . self::ASPAMIA_VERSION . ' ' .
194 'PHP/' . PHP_VERSION;
196 $response->setHeader(array(
menu_creator.php (https://github.com/GansukhB/phtstr.git) PHP · 231 lines
1 <?PHP
2 session_start();
3 session_register("mgruser");
4 $_SESSION['mgruser'] = 1;
6 include( "../database.php" );
7 include( "../config_public.php" );
8 include( "../functions.php" );
10 //$lang = $_SESSION['lang'];
59 }
60 if($ca->pub_pri == 1){
61 $output.= "'" . $setting->site_url . "/pri.php?gid=" . $ca->id . "&gal=" . $ca->rdmcode . "',,";
62 } else {
test.php (https://github.com/jacomyma/GEXF-Atlas.git) PHP · 301 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
153 $path = $tempDir . DIRECTORY_SEPARATOR . $value;
154 $fh = fopen( $path, "wb" );
155 fwrite( $fh, "some values" );
156 fclose( $fh );
157 chmod( $path, 0 );
188 $path = $tempDir . DIRECTORY_SEPARATOR . $value;
189 $fh = fopen( $path, "wb" );
190 fwrite( $fh, "some values" );
191 fclose( $fh );
192 chmod( $path, 0 );
CSV.php (https://github.com/allinside/Yii-CMS.git) PHP · 298 lines
33 * @package PHPExcel_Writer
34 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
87 * Create a new PHPExcel_Writer_CSV
88 *
89 * @param PHPExcel $phpExcel PHPExcel object
90 */
91 public function __construct(PHPExcel $phpExcel) {
92 $this->_phpExcel = $phpExcel;
93 }
107 $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
108 PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
110 // Open file
005_variation.php (https://github.com/tstarling/hiphop-php.git) PHP · 170 lines
1 <?php
2 /*
3 Prototype: int fileatime ( string $filename );
73 echo "\n-- Checking different times, after writing into the file --\n";
74 $file_write_handle = fopen($file_name, "w");
75 fwrite($file_write_handle, "Hello, world");
76 fclose($file_write_handle);
77 stat_fn($file_name);
145 echo "Done\n";
146 ?>
147 <?php
148 $file_path = dirname(__FILE__);
149 if(file_exists($file_path."/005_variation_softlink.tmp")) {
ErrorHandler.php (https://github.com/mako-framework/framework.git) PHP · 399 lines
1 <?php
3 /**
22 use function error_reporting;
23 use function filter_var;
24 use function fwrite;
25 use function headers_sent;
26 use function http_response_code;
115 protected function write(string $output): void
116 {
117 if(PHP_SAPI === 'cli' && ini_get('display_errors') === 'stderr')
118 {
119 fwrite(STDERR, $output);
136 if($this->displayErrors())
137 {
138 $this->write('[ ' . $e::class . "] {$e->getMessage()} on line [ {$e->getLine()} ] in [ {$e->getFile()} ]" . PHP_EOL);
140 $this->write($e->getTraceAsString() . PHP_EOL);
cron.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 95 lines
1 <?php
3 // This file is part of Moodle - http://moodle.org/
19 * Web cron
20 *
21 * This script looks through all the module directories for cron.php files
22 * and runs them. These files can contain cleanup functions, email functions
23 * or anything that needs to be run on a regular basis.
24 *
25 * This file is best run from cron on the host system (ie outside PHP).
26 * It is strongly recommended to add password protection via admin settings.
27 *
40 if (defined('STDIN')) {
41 fwrite(STDERR, "ERROR: This script no longer supports CLI, please use admin/cli/cron.php instead\n");
42 exit(1);
43 }
ModifyInf.c (https://gitlab.com/envieidoc/Clover) C · 339 lines
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
97 --*/
98 {
99 fwrite (Line, strlen (Line), 1, fp);
100 return 0;
101 }
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
1 <?php
3 /**
4 * File holding the DirectFilesystem class.
5 *
6 * @file DirectFilesystem.php
7 * @ingroup Deployment
8 * @ingroup Filesystem
17 /**
18 * Filesystem class for direct PHP file and folder manipulation.
19 *
20 * @author Jeroen De Dauw
425 */
426 public function makeDir( $path, $chmod = false, $chown = false, $chgrp = false ) {
427 // Safe mode fails with a trailing slash under certain PHP versions.
428 $path = rtrim( $path, '/' );
_default_fcntl.h (https://github.com/tarcuri/tomos.git) C Header · 204 lines
8 #define _FOPEN (-1) /* from sys/file.h, kernel use only */
9 #define _FREAD 0x0001 /* read enabled */
10 #define _FWRITE 0x0002 /* write enabled */
11 #define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
12 #define _FMARK 0x0010 /* internal; mark during gc() */
29 * Flag values for open(2) and fcntl(2)
30 * The kernel adds 1 to the open modes to turn it into some
31 * combination of FREAD and FWRITE.
32 */
33 #define O_RDONLY 0 /* +1 == FREAD */
86 */
87 #define FREAD _FREAD
88 #define FWRITE _FWRITE
89 #define FMARK _FMARK
90 #define FDEFER _FDEFER
File.php (https://bitbucket.org/jonbiard/nucleus.git) PHP · 233 lines
1 <?php
2 /**
3 * Class File
36 *
37 * @param string $path The file path
38 * @param string $mode The mode (see PHP's fopen() function)
39 *
40 * @throws IOException When the file path cannot be opened
222 {
223 if ($length === null) {
224 $result = @fwrite($this->fh, $data);
225 } else {
226 $result = @fwrite($this->fh, $data, $length);
Socket.php (https://gitlab.com/link233/bootmw) PHP · 383 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3 // +---------------------------------------------------------------------------
332 $write = array($this->stream);
334 // fwrite to a socket may be partial, so loop until we
335 // are done with the entire buffer
336 $written = 0;
342 if ($buflen - $written > self::MAX_WRITE_BUFFER) {
343 // write max buffer size
344 $wrote = fwrite($this->stream, substr($buf, $written, self::MAX_WRITE_BUFFER));
345 } else {
346 // write remaining buffer bytes to stream
347 $wrote = fwrite($this->stream, substr($buf, $written));
348 }
349 if ($wrote === -1 || $wrote === false) {
PlayerFrameTable.cpp (https://github.com/gp-alex/world-of-might-and-magic.git) C++ · 208 lines
updateclass.php (https://github.com/joshbhamilton/sugarcrm_dev.git) PHP · 111 lines
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
39 require("include/modules.php");
40 require_once("include/utils/sugar_file_utils.php");
49 sugar_file_put_contents($filename,$data);
51 // Rename the SugarBean file into SugarCore.SugarBean (Ex: SugarCore.Call.php)
52 $pos=strrpos($filename,"/");
53 $newfilename=substr_replace($filename, 'SugarCore.', $pos+1, 0);
57 $fileHandle = sugar_fopen($filename, 'w') ;
58 $newclass = <<<FABRICE
59 <?php
60 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
61 /*********************************************************************************
AbstractCsv.php (https://bitbucket.org/kipgor/lovata_practice.git) PHP · 273 lines
1 <?php
2 /**
3 * This file is part of the League.csv library
4 *
5 * @license http://opensource.org/licenses/MIT
6 * @link https://github.com/thephpleague/csv/
7 * @version 8.2.0
8 * @package League.csv
130 /**
131 * Return a new {@link AbstractCsv} from a PHP resource stream or a StreamIterator
132 *
133 * @param resource $stream
153 {
154 $file = new SplTempFileObject();
155 $file->fwrite(static::validateString($str));
157 return new static($file);
CacheTest.php (https://github.com/imr/horde.git) PHP · 302 lines
1 <?php
2 /**
3 * Test the Kolab cache.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
9 * @author Gunnar Wrobel <wrobel@pardus.de>
10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11 * @link http://pear.horde.org/index.php?package=Kolab_Storage
12 */
24 * @author Gunnar Wrobel <wrobel@pardus.de>
25 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26 * @link http://pear.horde.org/index.php?package=Kolab_Storage
27 */
28 class Horde_Kolab_Storage_Unit_CacheTest
PHPTemp.php (https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework) 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 /**
63 fseek($this->_fileHandle,0,SEEK_END);
64 $offset = ftell($this->_fileHandle);
65 fwrite($this->_fileHandle, serialize($this->_currentObject));
66 $this->_cellCache[$this->_currentObjectID] = array('ptr' => $offset,
67 'sz' => ftell($this->_fileHandle) - $offset
openid_file_store.php (https://github.com/F5/zetacomponents.git) PHP · 301 lines
fwrite_variation2-win32.php (https://github.com/tstarling/hiphop-php.git) PHP · 80 lines
1 <?php
2 /*
3 Prototype: int fwrite ( resource $handle,string string, [, int $length] );
4 Description: fwrite() writes the contents of string to the file stream pointed to by handle.
5 If the length arquement is given,writing will stop after length bytes have been
6 written or the end of string reached, whichever comes first.
7 fwrite() returns the number of bytes written or FALSE on error
8 */
11 echo "*** Testing fwrite() various operations ***\n";
13 // include the file.inc for Function: function delete_file($filename)
ReadableResourceStreamTest.php (https://bitbucket.org/chaike/adt.git) PHP · 267 lines
1 <?php
3 namespace React\Tests\Stream;
13 public function testConstructor()
14 {
15 $stream = fopen('php://temp', 'r+');
16 $loop = $this->createLoopMock();
64 public function testCloseShouldEmitCloseEvent()
65 {
66 $stream = fopen('php://temp', 'r+');
67 $loop = $this->createLoopMock();
77 public function testCloseTwiceShouldEmitCloseEventOnce()
78 {
79 $stream = fopen('php://temp', 'r+');
80 $loop = $this->createLoopMock();
bin2note.c (https://github.com/jdgordon/rockbox.git) C · 180 lines
generate_doc_common.php (https://github.com/datastax/php-driver.git) PHP · 207 lines
Lite.php (https://github.com/cpbx/snom_feedreadr.git) PHP · 395 lines
1 <?php
2 /**
3 * Config_Lite (Config/Lite.php)
4 *
5 * PHP version 5
6 *
7 * @file Config/Lite.php
20 *
21 * read & save "INI-Style" Configuration Files,
22 * fast and with the native php function under the hood.
23 *
24 * Inspired by Python's ConfigParser.
102 {
103 // maybe this line should be optional
104 $content = ';<?php exit; ?>' . "\n";
105 $sections = '';
106 // note: it is valid to write an empty Config file
Response.php (https://github.com/ggunlugu/ornekler.git) PHP · 144 lines
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
5 * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
60 if (!is_resource($this->output)) {
61 $this->output = fopen('php://stdout', 'r');;
62 }
66 if (!is_resource($this->error)) {
67 $this->error = fopen('php://stderr', 'r');;
68 }
69 parent::__construct($config);
Redisent.php (https://github.com/d11wtq/php-resque.git) PHP · 147 lines
1 <?php
2 /**
3 * Redisent, a Redis interface for the modest
4 * @author Justin Poliey <jdp34@njit.edu>
5 * @copyright 2009 Justin Poliey <jdp34@njit.edu>
6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
7 * @package Redisent
8 */
12 /**
13 * Wraps native Redis errors in friendlier PHP exceptions
14 */
15 class RedisException extends Exception {
73 for ($written = 0; $written < strlen($command); $written += $fwrite) {
74 $fwrite = fwrite($this->__sock, substr($command, $written));
75 if ($fwrite === FALSE) {
upload.php (https://gitlab.com/vince.omega/mcb-nov-build) PHP · 111 lines
1 <?php
2 //create the directory if doesn't exists (should have write permissons)
3 if(!is_dir("./files")) mkdir("./files", 0755);
9 $fh = fopen($myFile, 'w') or die("can't open file");
10 $stringData = "HERE IS YOUR PIXEL DATA\n";
11 fwrite($fh, $stringData);
12 $stringData = "-----------------------\n";
13 fwrite($fh, $stringData);
71 imagesetpixel($image, $x,$y, $black);
72 $stringData = 'Red: '.$r.' -- Green: '.$g.' -- Blue: '.$b.' \n';
73 //fwrite($fh, $stringData);
fgetcsv_variation8.php (https://gitlab.com/iranjith4/hhvm) PHP · 92 lines
1 <?php
2 /*
3 Prototype: array fgetcsv ( resource $handle [, int $length [, string $delimiter [, string $enclosure]]] );
52 $csv_field = $csv_list[2];
54 fwrite($file_handle, $csv_field . "\n");
55 // write another line of text and a blank line
56 // this will be used to test, if the fgetcsv() read more than a line and its
57 // working when only a blank line is read
58 fwrite($file_handle, "This is line of text without csv fields\n");
59 fwrite($file_handle, "\n"); // blank line
W_MOA.CPP (https://gitlab.com/Mednonogov/ZX0) C++ · 141 lines
Stream.php (https://github.com/tokushima/rhaco1.git) PHP · 151 lines
1 <?php
2 Rhaco::import("network.http.Http");
3 Rhaco::import("io.FileUtil");
24 if(preg_match("/[\w]+:\/\/[\w]+/",$url)){
25 if(preg_match("/php:\/\/(.+)/i",$url,$type)){
26 $type = strtolower($type);
47 /*** #pass */
48 if(preg_match("/[\w]+:\/\/[\w]+/",$url)){
49 if(preg_macth("/php:\/\/(.+)/i",$url,$type)){
50 $type = strtolower($type);
69 /*** #pass */
70 $buffer = "";
71 $fp = fopen("php://stdin","r");
72 if(!$fp){
73 ExceptionTrigger::raise(new PermissionException("php://stdin"));
Shell.php (https://gitlab.com/Conors99/ppm-1.8) PHP · 165 lines
1 <?php
2 /**
3 * Class used internally by Diff to actually compute the diffs.
47 $to_file = Horde_Util::getTempFile('Horde_Text_Diff');
48 $fp = fopen($from_file, 'w');
49 fwrite($fp, implode("\n", $from_lines));
50 fclose($fp);
51 $fp = fopen($to_file, 'w');
52 fwrite($fp, implode("\n", $to_lines));
53 fclose($fp);
54 $diff = shell_exec($this->_diffCommand . ' ' . $from_file . ' ' . $to_file);
UpgradeLogger.php (https://bitbucket.org/valmy/openx.git) PHP · 197 lines
1 <?php
2 /*
3 +---------------------------------------------------------------------------+
40 /**
41 * php5 class constructor
42 *
43 * simpletest throws a BadGroupTest error
52 /**
53 * php4 class constructor
54 *
55 * @return boolean
162 $this->logBuffer = array();
163 }
164 fwrite($log, "{$message}\n");
165 fclose($log);
166 }
lmbSocketWebAgentRequest.class.php (https://github.com/kugu/limb.git) PHP · 240 lines
1 <?php
2 /*
3 * Limb PHP Framework
8 */
10 lmb_require(dirname(__FILE__).'/lmbAbstractWebAgentRequest.class.php');
11 lmb_require(dirname(__FILE__).'/../lmbWebServerResponse.class.php');
12 lmb_require(dirname(__FILE__).'/../lmbWebAgentCookie.class.php');
13 lmb_require(dirname(__FILE__).'/../lmbWebAgentHeaders.class.php');
14 lmb_require(dirname(__FILE__).'/../lmbWebServerCookiesCollection.class.php');
16 /**
18 *
19 * @package web_agent
20 * @version $Id: lmbSocketWebAgentRequest.class.php 7686 2009-03-04 19:57:12Z korchasa $
21 */
22 class lmbSocketWebAgentRequest extends lmbAbstractWebAgentRequest {
StreamOutput.php (https://gitlab.com/alexandresgv/siteentec) PHP · 101 lines
1 <?php
3 /*
21 * Usage:
22 *
23 * $output = new StreamOutput(fopen('php://stdout', 'w'));
24 *
25 * As `StreamOutput` can use any stream, you can also use a file:
73 protected function doWrite($message, $newline)
74 {
75 if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) {
76 // should never happen
77 throw new RuntimeException('Unable to write output.');
tool-file-editor.php (https://bitbucket.org/wedodigital/wedo-proofs.git) PHP · 239 lines
1 <?php
2 /**
3 * @package WPSEO\Admin
32 $f = fopen( $robots_file, 'x' );
33 fwrite( $f, $robots_content );
34 }
50 if ( is_writable( $robots_file ) ) {
51 $f = fopen( $robots_file, 'w+' );
52 fwrite( $f, $robotsnew );
53 fclose( $f );
54 $msg = sprintf(
77 if ( is_writeable( $ht_access_file ) ) {
78 $f = fopen( $ht_access_file, 'w+' );
79 fwrite( $f, $ht_access_new );
80 fclose( $f );
81 }
tempvars.php (https://bitbucket.org/dreamriks/gift.git) PHP · 121 lines
1 <?php
2 /**
3 * Akeeba Engine
4 * The modular PHP5 site backup engine
5 * @copyright Copyright (c)2009-2011 Nicholas K. Dionysopoulos
6 * @license GNU GPL version 3 or, at your option, any later version
7 * @package akeebaengine
8 * @version $Id: tempvars.php 409 2011-01-24 09:30:22Z nikosdion $
9 */
26 {
27 if(!empty($tag)) {
28 $basename = 'akeeba_'.$tag.'.php';
29 } else {
30 $basename = 'akeeba_storage.php';
LoggingHttpClientAdapterSocket.php (https://bitbucket.org/squints/greekgeek.git) PHP · 119 lines
1 <?php
3 /**
17 * @package Zend_Gdata
18 * @subpackage App
19 * @version $Id: LoggingHttpClientAdapterSocket.php 24593 2012-01-05 20:35:02Z matthew $
20 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
21 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * @see Zend_Http_Client_Adapter_Socket
26 */
27 require_once 'Zend/Http/Client/Adapter/Socket.php';
29 /**
61 $this->log_handle = fopen($this->config['logfile'], 'a');
62 }
63 fwrite($this->log_handle, $message);
64 }
gen_systemlib.php (https://bitbucket.org/gnanakeethan/hiphop-php.git) PHP · 99 lines
8 $outputPath = $argv[1];
10 function processPhpFile($phpfile, $systemlib_php) {
11 $firstchar = true;
12 $contents = file_get_contents($phpfile);
62 // the classes in a certain order so that all classes can be
63 // hoisted.
64 $initialFiles = array('stdclass.php', 'exception.php', 'arrayaccess.php',
65 'iterator.php', 'splfile.php');
67 if (isset($phpfiles[$initialFile])) {
68 processPhpFile($phpfiles[$initialFile], $systemlib_php);
69 unset($phpfiles[$initialFile]);
73 if (preg_match('/\.php$/', $phpfile)) {
74 processPhpFile($phpfile, $systemlib_php);
75 unset($phpfiles[$key]);
FilterTest.php (https://gitlab.com/m.ghanbari/mailgun-subscriber) PHP · 386 lines
15 fwrite($stream, 'hello');
16 fwrite($stream, 'world');
17 rewind($stream);
73 public function testAppendEndEventCanBeBufferedOnClose()
74 {
75 if (PHP_VERSION < 5.4) $this->markTestSkipped('Not supported on legacy PHP');
77 $stream = $this->createStream();
145 }, STREAM_FILTER_WRITE);
147 fwrite($stream, 'a');
148 fwrite($stream, 'b');
214 StreamFilter\remove($first);
216 fwrite($stream, 'hello');
217 rewind($stream);
OrderedLayers.java (https://github.com/virasak/iText-4.2.0.git) Java · 96 lines
30 import com.lowagie.text.pdf.PdfName;
31 import com.lowagie.text.pdf.PdfOCProperties;
32 import com.lowagie.text.pdf.PdfWriter;
34 /**
47 Document document = new Document(PageSize.A4, 50, 50, 50, 50);
48 // step 2
49 PdfWriter writer = PdfWriter.getInstance(document,
50 new FileOutputStream("orderedlayers.pdf"));
51 writer.setPdfVersion(PdfWriter.VERSION_1_5);
52 writer.setViewerPreferences(PdfWriter.PageModeUseOC);
53 // step 3
54 document.open();
AbstractCsv.php (https://bitbucket.org/ltdwebant/laboratorium.git) PHP · 273 lines
1 <?php
2 /**
3 * This file is part of the League.csv library
4 *
5 * @license http://opensource.org/licenses/MIT
6 * @link https://github.com/thephpleague/csv/
7 * @version 8.2.2
8 * @package League.csv
130 /**
131 * Return a new {@link AbstractCsv} from a PHP resource stream or a StreamIterator
132 *
133 * @param resource $stream
153 {
154 $file = new SplTempFileObject();
155 $file->fwrite(static::validateString($str));
157 return new static($file);
AbstractCsv.php (https://bitbucket.org/limelightdept/limelight-ada-theme.git) PHP · 273 lines
1 <?php
2 /**
3 * This file is part of the League.csv library
4 *
5 * @license http://opensource.org/licenses/MIT
6 * @link https://github.com/thephpleague/csv/
7 * @version 8.2.3
8 * @package League.csv
130 /**
131 * Return a new {@link AbstractCsv} from a PHP resource stream or a StreamIterator
132 *
133 * @param resource $stream
153 {
154 $file = new SplTempFileObject();
155 $file->fwrite(static::validateString($str));
157 return new static($file);
cake_socket.php (https://github.com/t73biz/BaseApp.git) PHP · 305 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)
login.php (https://github.com/musicpop/cms.git) PHP · 114 lines
1 <?php
2 /**
3 * ºǫ́µÇ½
11 require_once(dirname(__FILE__).'/../include/common.inc.php');
12 require_once(DEDEINC.'/userlogin.class.php');
13 if(empty($dopost)) $dopost = '';
25 if( file_exists("../install/index.php") ) {
26 @rename("../install/index.php", "../install/index.php.bak");
27 }
28 if( file_exists("../install/module-install.php") ) {
29 @rename("../install/module-install.php", "../install/module-install.php.bak");
30 }
31 $fileindex = "../install/index.html";
WaveFloatFileWriter.java (https://gitlab.com/borneywpf/openjdk-7-src) Java · 146 lines
64 }
66 public void write(AudioInputStream stream, RIFFWriter writer)
67 throws IOException {
125 if (stream.getFormat().isBigEndian())
126 stream = toLittleEndian(stream);
127 RIFFWriter writer = new RIFFWriter(new NoCloseOutputStream(out), "WAVE");
128 write(stream, writer);
129 int fpointer = (int) writer.getFilePointer();
137 if (stream.getFormat().isBigEndian())
138 stream = toLittleEndian(stream);
139 RIFFWriter writer = new RIFFWriter(out, "WAVE");
140 write(stream, writer);
141 int fpointer = (int) writer.getFilePointer();
test.php (https://github.com/mmayorov/php-hoptoad-notifier.git) PHP · 120 lines
2 <?php
3 require_once 'PHPUnit/Framework.php';
4 require_once 'Services/Hoptoad.php';
6 $_SERVER = array(
7 'HTTP_HOST' => 'localhost',
8 'REQUEST_URI' => '/example.php',
9 'HTTP_REFERER' => 'http://localhost/reports/something',
10 );
27 $_REQUEST = array_merge($_GET, $_POST);
29 class HoptoadTest extends PHPUnit_Framework_TestCase
30 {
31 protected function setUp()
42 array(
43 'class' => 'Foo',
44 'file' => 'foo.php',
45 'line' => 242,
46 'function' => 'foo',
M_echohist.php (https://github.com/Mithgol/Nephtsys.git) PHP · 205 lines
1 <?php
2 /*\
3 / This is a part of PhFiTo (aka PHP Fido Tosser)
7 /// See docs/license for details
8 //
9 / $Id: M_echohist.php,v 1.6 2011/01/09 08:53:12 kocharin Exp $
10 \*/
52 $line = $echo.'|'.$msgid."\t".time().'| '.$path.'| '.$seenby.'|'.
53 $subj.'|'.$from.'|'.$fromaddr.'|'.$to.'|'.$origdate."\n";
54 fwrite($this->file,$line,strlen($line));
55 }
56 }
184 for($i=0,$s=sizeof($this->net_files); $i<$s; $i++) {
185 $line = $this->transform_line($this->net_lines[$i]);
186 fwrite($this->handles[$this->net_files[$i]],$line."\n");
187 }
188 } else {
fprintf-1-0.asm (https://github.com/kframework/X86-64-semantics.git) Assembly · 557 lines
generate_sitemap.php (https://github.com/rii-J/concrete5-de.git) PHP · 118 lines
poToCountries.php (https://github.com/mbehiels/omp.git) PHP · 127 lines
1 <?php
3 /**
4 * @file poToCountries.php
5 *
6 * Copyright (c) 2003-2011 John Willinsky
18 require(dirname(__FILE__) . '/bootstrap.inc.php');
20 define('PO_TO_CSV_TOOL', '/usr/bin/po2csv');
92 if (!$oh) die ("Unable to $ofn for writing.\n");
94 fwrite($oh, '<?xml version="1.0" encoding="UTF-8"?>
96 <!--
base64encode.m (https://github.com/yuval-harpaz/ft_BIU.git) Objective C · 159 lines
schema_diff.php (https://github.com/F5/zetacomponents.git) PHP · 189 lines
1 <?php
2 /**
3 *
119 * @param int $type
120 */
121 static private function checkSchemaDiffWriter( $obj, $type )
122 {
123 if ( !( ( $obj->getDiffWriterType() & $type ) == $type ) )
138 public function writeToFile( $format, $file )
139 {
140 $className = ezcDbSchemaHandlerManager::getDiffWriterByFormat( $format );
141 $reader = new $className();
142 self::checkSchemaDiffWriter( $reader, ezcDbSchema::FILE );
154 public function applyToDb( ezcDbHandler $db )
155 {
156 $className = ezcDbSchemaHandlerManager::getDiffWriterByFormat( $db->getName() );
157 $writer = new $className();
158 self::checkSchemaDiffWriter( $writer, ezcDbSchema::DATABASE );
Pop3Connection.php (https://github.com/apurvgupta12/Ushahidi_Web.git) PHP · 176 lines
TextExtractionTest.java (https://github.com/virasak/iText-4.2.0.git) Java · 253 lines
142 final Document document = new Document();
143 PdfWriter writer = PdfWriter.getInstance(document, byteStream);
144 document.setPageSize(PageSize.LETTER);
171 final Document document = new Document();
172 PdfWriter writer = PdfWriter.getInstance(document, byteStream);
173 document.setPageSize(PageSize.LETTER);
201 final Document document = new Document();
202 PdfWriter writer = PdfWriter.getInstance(document, byteStream);
203 document.setPageSize(PageSize.LETTER);
puff_io_unittest.cc (https://github.com/chromium/chromium.git) C++ · 399 lines
16 PuffData pd;
18 BufferPuffWriter pw(buf.data(), buf.size());
19 // We need to insert a metadata otherwise it will fail.
20 pd.type = PuffData::Type::kBlockMetadata;
59 } // namespace
61 // Testing read/write from/into a puff buffer using |PuffReader|/|PuffWriter|.
62 TEST(PuffIOTest, InputOutputTest) {
63 Buffer buf(100);
64 BufferPuffReader pr(buf.data(), buf.size());
65 BufferPuffWriter pw(buf.data(), buf.size());
66 BufferPuffWriter epw(nullptr, 0);
226 PuffData pd;
227 Buffer buf(3);
228 BufferPuffWriter pw(buf.data(), buf.size());
230 // Block metadata takes two + varied bytes, so on a thre byte buffer, only one
io.cpp (https://code.google.com/p/nullc/) C++ · 249 lines
client.php (http://dutils.googlecode.com/svn/trunk/) PHP · 208 lines
pcreprecompile.html
(git://github.com/macournoyer/tinyrb.git)
HTML · 149 lines
✨ Summary
This HTML code generates a documentation page for PCRE (Perl-Compatible Regular Expressions) precompilation and recompilation. It provides information on saving, reusing, and compatibility with different PCRE releases, as well as author and revision details. The page is part of the PCRE HTML documentation and was automatically generated from an original man page.
This HTML code generates a documentation page for PCRE (Perl-Compatible Regular Expressions) precompilation and recompilation. It provides information on saving, reusing, and compatibility with different PCRE releases, as well as author and revision details. The page is part of the PCRE HTML documentation and was automatically generated from an original man page.
structure.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 945 lines
apdl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 7537 lines
Mesh2dn.cpp (git://pkgs.fedoraproject.org/freefem++) C++ · 456 lines
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>