100+ results for 'php fclose'
Not the results you expected?
mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines
1 <?php
2 class Mail {
3 protected $to;
94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
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;
98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
128 $content = fread($handle, filesize($attachment));
130 fclose($handle);
132 $message .= '--' . $boundary . $this->newline;
157 exit();
158 } else {
159 if (substr(PHP_OS, 0, 3) != 'WIN') {
160 socket_set_timeout($handle, $this->timeout, 0);
161 }
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';
139 $this->assertEquals(' 1', fread($fp, 8092));
140 $this->assertEquals(5, ftell($fp));
141 $this->assertTrue(fclose($fp));
142 }
181 $fp = fopen($vfsFile, 'ab');
182 fwrite($fp, 'd');
183 fclose($fp);
184 $this->assertEquals('testd', file_get_contents($vfsFile));
185 }
test.php (https://github.com/F5/zetacomponents.git) PHP · 297 lines
File.php (https://github.com/max-shamaev/phpdaemon.git) PHP · 301 lines
If.php (https://gitlab.com/flyhope/Hiblog) PHP · 221 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Compile If
56 }
57 if (is_array($parameter['if condition']['var'])) {
58 $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value)) \$_smarty_tpl->createLocalArrayVariable(" . $parameter['if condition']['var']['var'] . "$_nocache);\n";
59 $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" . $parameter['if condition']['var']['smarty_internal_index'] . " = " . $parameter['if condition']['value'] . ") {?>";
60 } else {
61 $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "] = new Smarty_Variable(null{$_nocache});";
62 $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " . $parameter['if condition']['value'] . ") {?>";
63 }
65 return $_output;
66 } else {
67 return "<?php if ({$parameter['if condition']}) {?>";
68 }
69 }
FileValidatorTest.php (https://bitbucket.org/hill2steve/mobileroom.git) PHP · 329 lines
AsyncStream.php (https://github.com/max-shamaev/phpdaemon.git) PHP · 524 lines
balanceTags.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 234 lines
1 <?php
3 /**
35 * @dataProvider basic_single_tags
36 */
37 function test_selfcloses_unclosed_basic_known_single_tags( $tag ) {
38 $this->assertEquals( "<$tag />", balanceTags( "<$tag>", true ) );
39 }
45 * @dataProvider single_tags
46 */
47 function test_selfcloses_unclosed_known_single_tags( $tag ) {
48 $this->assertEquals( "<$tag />", balanceTags( "<$tag>", true ) );
49 }
56 * @dataProvider basic_single_tags
57 */
58 function test_selfcloses_basic_known_single_tags_having_closing_tag( $tag ) {
59 $this->assertEquals( "<$tag />", balanceTags( "<$tag></$tag>", true ) );
60 }
File.php (https://gitlab.com/Ltaimao/wecenter) 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);
rcs.php (https://github.com/wrobel/horde-fw3.git) PHP · 235 lines
1 <?php
2 /**
3 * VC_rcs implementation.
5 * Copyright 2004-2007 Jeff Schwentner <jeffrey.schwentner@lmco.com>
6 *
7 * $Horde: framework/VC/VC/rcs.php,v 1.3.8.7 2007-12-20 13:50:17 jan Exp $
8 *
9 * @author Jeff Schwentner <jeffrey.schwentner@lmco.com>
59 fwrite($pipes[0], "\n.\n");
60 fclose($pipes[0]);
62 while (!feof($pipes[1])) {
63 $output .= fread($pipes[1], 8192);
64 }
65 fclose($pipes[1]);
66 proc_close($process);
67 } else {
rcs.php (https://github.com/Excito/horde3.git) PHP · 235 lines
1 <?php
2 /**
3 * VC_rcs implementation.
5 * Copyright 2004-2007 Jeff Schwentner <jeffrey.schwentner@lmco.com>
6 *
7 * $Horde: framework/VC/VC/rcs.php,v 1.3.8.7 2007/12/20 13:50:17 jan Exp $
8 *
9 * @author Jeff Schwentner <jeffrey.schwentner@lmco.com>
59 fwrite($pipes[0], "\n.\n");
60 fclose($pipes[0]);
62 while (!feof($pipes[1])) {
63 $output .= fread($pipes[1], 8192);
64 }
65 fclose($pipes[1]);
66 proc_close($process);
67 } else {
install.php (https://github.com/keeganmann/FRC-Stats.git) PHP · 181 lines
1 <html>
2 <head>
3 <title>FRC STATS - <?php echo $title ?></title>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <link rel="stylesheet" type="text/css" href="styles.css" />
29 </head>
30 <body>
31 <?php
32 include('config.php');
34 ?>
35 <h1 style="color: #ff0000;">ERROR: SYSTEM ALREADY INSTALLED</h1>
36 <A href="index.php">Click here to continue</a>
37 <?php
39 else if ($_POST['username'] != "") {
40 echo "installing...";
41 //set database login info in config.php
42 $file = fopen("config.php", "a");
CFileLogRoute.php (https://github.com/allinside/Yii-CMS.git) PHP · 167 lines
1 <?php
2 /**
3 * CFileLogRoute class file.
21 *
22 * @author Qiang Xue <qiang.xue@gmail.com>
23 * @version $Id: CFileLogRoute.php 3001 2011-02-24 16:42:44Z alexander.makarow $
24 * @package system.logging
25 * @since 1.0
140 @fwrite($fp,$this->formatLogMessage($log[0],$log[1],$log[2],$log[3]));
141 @flock($fp,LOCK_UN);
142 @fclose($fp);
143 }
Filesystem.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 234 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 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 24593 2012-01-05 20:35:02Z matthew $
21 */
23 /** Zend_Search_Lucene_Storage_File */
24 require_once 'Zend/Search/Lucene/Storage/File.php';
26 /**
49 public function __construct ($filename, $mode = 'r+b')
50 {
51 global $php_errormsg;
53 if (strpos($mode, 'w') === false && !is_readable($filename)) {
checksums.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 228 lines
1 <?php
2 /**
3 * File containing the ezcArchiveChecksums class.
118 * This method is taken from the PHP user comments
119 * (http://no.php.net/manual/en/function.crc32.php).
120 *
121 * @param string $fileName Absolute or relative path to the file.
176 * This method is taken from the PHP user comments
177 * (http://no.php.net/manual/en/function.crc32.php).
178 */
179 protected static function crc32InitTable()
203 * This method is taken from the PHP user comments
204 * (http://no.php.net/manual/en/function.crc32.php).
205 *
206 * @param int $ref
EntityManagerTest.php (https://github.com/proclamo/txinbometro.git) PHP · 158 lines
1 <?php
3 namespace Doctrine\Tests\ORM;
5 require_once __DIR__ . '/../TestInit.php';
7 class EntityManagerTest extends \Doctrine\Tests\OrmTestCase
122 }
124 static public function dataAffectedByErrorIfClosedException()
125 {
126 return array(
135 /**
136 * @dataProvider dataAffectedByErrorIfClosedException
137 * @param string $methodName
138 */
readpics.c (https://gitlab.com/aschmidt-berlin/fig2dev) C · 156 lines
category.php (https://gitlab.com/Raymon/QualityCaps_PHP) PHP · 282 lines
Reports.php (https://gitlab.com/dmsapiens/physicians) PHP · 327 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 class Reports extends CI_Controller {
308 header( 'Content-Type: text/csv;charset=utf-8' );
309 header( 'Content-Disposition: attachment;filename=report'.$filename);
310 $fp = fopen('php://output', 'w');
312 foreach($result as $row)
322 }
324 fclose($fp);
325 exit;
326 }
Template.php (https://github.com/agallou/BehatCH.git) PHP · 154 lines
1 <?php
2 /**
3 * Text_Template
39 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
40 * @copyright 2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 * @link http://www.phpunit.de/
51 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
52 * @copyright 2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
53 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
54 * @version Release: 1.0.0
55 * @link http://www.phpunit.de/
146 if ($fp) {
147 fwrite($fp, $this->render());
148 fclose($fp);
149 } else {
150 throw new RuntimeException('Could not write to ' . $target . '.');
PluginBase.php (https://gitlab.com/matthww/Elywing) PHP · 298 lines
1 <?php
3 /*
172 /**
173 * Gets an embedded resource on the plugin file.
174 * WARNING: You must close the resource given using fclose()
175 *
176 * @param string $filename
213 $ret = stream_copy_to_stream($resource, $fp = fopen($out, "wb")) > 0;
214 fclose($fp);
215 fclose($resource);
260 if(($configStream = $this->getResource("config.yml")) !== null){
261 $this->config->setDefaults(yaml_parse(config::fixYAMLIndexes(stream_get_contents($configStream))));
262 fclose($configStream);
263 }
264 }
CurlClient.php (https://github.com/trob/fabrik.git) PHP · 191 lines
1 <?php
80 if (isset($buffer) && \is_resource($buffer)) {
81 \fclose($buffer);
82 }
100 if (isset($buffer) && \is_resource($buffer)) {
101 \fclose($buffer);
102 }
147 $options[CURLOPT_PUT] = true;
148 if ($data) {
149 if ($buffer = \fopen('php://memory', 'w+')) {
150 $dataString = $this->buildQuery($data);
151 \fwrite($buffer, $dataString);
Stream.php (https://gitlab.com/ealexis.t/trends) PHP · 245 lines
share.php (https://gitlab.com/AaronDeb/cloudbox) PHP · 190 lines
DiscISAM.php (https://gitlab.com/ptisky/API_prestashop) PHP · 219 lines
22 * @package PHPExcel_CachedObjectStorage
23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version 1.7.9, 2013-06-02
34 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {
38 /**
85 *
86 * @param string $pCoord Coordinate address of the cell to update
87 * @param PHPExcel_Cell $cell Cell to update
88 * @return void
89 * @throws PHPExcel_Exception
90 */
91 public function addCacheData($pCoord, PHPExcel_Cell $cell) {
92 if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
93 $this->_storeData();
kanji-encoding.lib.php (https://github.com/drbowen/openemr.git) PHP · 161 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * language)
6 *
7 * PHP4 configure requirements:
8 * --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex
9 *
10 * 2002/2/22 - by Yukihiro Kawada <kawada@den.fujifilm.co.jp>
11 *
12 * @package PhpMyAdmin
13 */
14 if (! defined('PHPMYADMIN')) {
18 /**
19 * Gets the php internal encoding codes and sets the available encoding
20 * codes list
21 * 2002/1/4 by Y.Kawada
paypal_payment_helper.php (https://github.com/katzgrau/notes.git) PHP · 137 lines
netapp-storage-action.php (https://github.com/qyjohn/openqrm.git) PHP · 121 lines
1 <?php
2 /*
3 This file is part of openQRM.
23 $RootDir = $_SERVER["DOCUMENT_ROOT"].'/openqrm/base/';
24 require_once "$RootDir/include/openqrm-database-functions.php";
25 require_once "$RootDir/include/user.inc.php";
26 require_once "$RootDir/include/openqrm-server-config.php";
27 require_once "$RootDir/class/storage.class.php";
28 require_once "$RootDir/class/resource.class.php";
29 require_once "$RootDir/class/deployment.class.php";
30 require_once "$RootDir/class/event.class.php";
31 require_once "$RootDir/class/authblocker.class.php";
Csv.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 142 lines
Printer.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 173 lines
1 <?php
2 /*
3 * This file is part of PHPUnit.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
12 * Utility class that can print to STDOUT or write to a file.
13 *
14 * @author Sebastian Bergmann <sebastian@phpunit.de>
15 * @copyright Sebastian Bergmann <sebastian@phpunit.de>
16 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
17 * @link http://www.phpunit.de/
18 * @since Class available since Release 2.0.0
19 */
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 */
239 protected function _close()
240 {
241 fclose($this->_fileHandler);
242 }
index.php (https://github.com/thomascrepain/classCreator.git) PHP · 217 lines
1 <?php
3 require_once 'settings.php';
4 require_once 'dal/MySQLDatabase.php';
5 require_once 'libs/Smarty.class.php';
109 $file = fopen($generatedFile, 'w') or die("Couldn't create file: " . toCamelCase($table));
110 fwrite($file, $fileContent);
111 fclose($file);
112 }
142 // Boolean
143 if (preg_match('/bool/i', $SQLtype) || preg_match('/boolean/i', $SQLtype)) {
144 $types = array('php' => 'boolean', 'as' => 'Boolean');
145 }
PoFileParser.php (https://github.com/LubosRemplik/cakephp.git) PHP · 184 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11 * @link https://cakephp.org CakePHP(tm) Project
12 * @since 3.0.0
13 * @license https://opensource.org/licenses/mit-license.php MIT License
124 // save last item
125 $this->_addMessage($messages, $item);
126 fclose($stream);
128 return $messages;
Stream.php (https://github.com/digitalstrategyworks/Reese-WordPress.git) PHP · 235 lines
1 <?php
3 /**
17 * @package Microsoft_Http
18 * @subpackage Response
19 * @version $Id: Response.php 17131 2009-07-26 10:03:39Z shahar $
20 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
21 * @license http://framework.zend.com/license/new-bsd New BSD License
218 $this->body = stream_get_contents($this->stream);
219 }
220 fclose($this->stream);
221 $this->stream = null;
222 }
225 {
226 if(is_resource($this->stream)) {
227 fclose($this->stream);
228 $this->stream = null;
229 }
streams.php (https://bitbucket.org/zenoalbisser/webkit.git) PHP · 191 lines
1 <?php
2 /**
3 * PHP-Gettext External Library: StreamReader classes
4 *
5 * @package External
6 * @subpackage PHP-gettext
7 *
8 * @internal
9 Copyright (c) 2003, 2005 Danilo Segan <danilo@kvota.net>.
11 This file is part of PHP-gettext.
13 PHP-gettext is free software; you can redistribute it and/or modify
16 (at your option) any later version.
18 PHP-gettext is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
BodyTest.php (https://gitlab.com/jatasya/testSlimfrmwk) 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 /**
26 {
27 if (is_resource($this->stream) === true) {
28 fclose($this->stream);
29 }
30 }
Error.php (https://bitbucket.org/vaneves/repono.git) PHP · 220 lines
1 <?php
2 /*
3 * Copyright (c) 2012, Valdirene da Cruz Neves Júnior <vaneves@vaneves.com>
15 {
16 /**
17 * Método que é executado quando ocorre algum erro no PHP
18 * @param int $type tipo do erro, que pode ser E_STRICT
19 * @param sintrg $message mensagem do erro
65 /**
66 * Método executado quando ocorre algum erro fatal no PHP, esse método é chamado
67 * antes que o PHP pare a execução da página
96 {
97 if (Debug::enabled())
98 return require_once root . 'core/error/debug.php';
100 $files = array();
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 */
239 protected function _close()
240 {
241 fclose($this->_fileHandler);
242 }
PostImageHandler.php (https://gitlab.com/wubbajack/insided-test) PHP · 288 lines
Openssl.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 353 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: Openssl.php 20288 2010-01-14 20:15:43Z thomas $
20 */
23 * @see Zend_Filter_Encrypt_Interface
24 */
25 // require_once 'Zend/Filter/Encrypt/Interface.php';
27 /**
69 {
70 if (!extension_loaded('openssl')) {
71 // require_once 'Zend/Filter/Exception.php';
72 throw new Zend_Filter_Exception('This filter needs the openssl extension');
73 }
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, '/' );
class-wp-filesystem-ftpsockets.php (https://gitlab.com/endomorphosis/reservationtelco) 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();
97 if ( ! $this->ftp->fget($temphandle, $file) ) {
98 fclose($temphandle);
99 unlink($temp);
100 return ''; //Blank document, File does exist, Its just blank.
107 $contents .= fread($temphandle, 8192);
109 fclose($temphandle);
110 unlink($temp);
111 return $contents;
ApplicationsController.php (https://github.com/andreapollastri/cipi.git) PHP · 169 lines
59 'dbpass' => $dbpass,
60 'basepath' => $base,
61 'php' => $request->php,
62 'appcode' => $appcode,
63 ]);
73 $ssh->setTimeout(360);
74 if($base) {
75 $response = $ssh->exec('echo '.$server->password.' | sudo -S sudo sh /cipi/host-add.sh -u '.$user.' -p '.$pass.' -dbp '.$dbpass.' -b '.$base.' -php '.$request->php.' -a '.$appcode.' -r '.$this->url->to('/'));
76 } else {
77 $response = $ssh->exec('echo '.$server->password.' | sudo -S sudo sh /cipi/host-add.sh -u '.$user.' -p '.$pass.' -dbp '.$dbpass.' -php '.$request->php.' -a '.$appcode.' -r '.$this->url->to('/'));
93 'dbpass' => $dbpass,
94 'path' => $base,
95 'php' => $request->php,
96 'domain' => $request->domain,
97 'host' => $server->ip,
Status.php (https://gitlab.com/daigiangaitu91/magento) PHP · 221 lines
1 <?php
2 /**
3 * Copyright © 2015 Magento. All rights reserved.
127 $isNewFile = !file_exists($filePath);
128 if (!$isNewFile && file_get_contents($filePath)) {
129 $text = $newline ? PHP_EOL . "{$text}" :"{$text}";
130 }
131 if (false === file_put_contents($filePath, $text, FILE_APPEND)) {
213 throw new \RuntimeException(sprintf('"%s" cannot be created.', $pathToFlagFile));
214 }
215 fclose($updateInProgressFlagFile);
216 } else if (file_exists($pathToFlagFile)) {
217 unlink($pathToFlagFile);
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 );
176 if ( $fp2 ) {
177 @fputs( $fp2, pack( 'L', time() + 30 ) );
178 @fclose( $fp2 );
179 }
180 $has_old_data = true;
194 @flock( $fp, LOCK_UN );
196 @fclose( $fp );
198 return array( $data, $has_old_data );
ShaderObject.cpp (https://hg.codeplex.com/ssaomx) C++ · 464 lines
mail.php (https://gitlab.com/2202Programming/navxmxp) PHP · 406 lines
1 <?php
2 class Mail {
3 protected $to;
94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
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;
128 $content = fread($handle, filesize($attachment));
130 fclose($handle);
132 $message .= '--' . $boundary . $this->newline;
157 exit();
158 } else {
159 if (substr(PHP_OS, 0, 3) != 'WIN') {
160 socket_set_timeout($handle, $this->timeout, 0);
161 }
cache_files_cleaner.php (https://gitlab.com/neuser/bitrix-core) PHP · 324 lines
146 return 1;//like an very old file
147 }
148 elseif(mb_substr($FileName, -4) == ".php")
149 {
150 $fd = fopen($FileName, "rb");
152 {
153 $header = fread($fd, 150);
154 fclose($fd);
155 if(preg_match("/dateexpire\s*=\s*'([\d]+)'/im", $header, $match))
156 return doubleval($match[1]);
163 {
164 $header = fread($fd, 26);
165 fclose($fd);
166 if(mb_substr($header, 0, 2) == "BX")
167 return doubleval(mb_substr($header, 14, 12));
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 *
176 /**
177 * Writes a PHP class.
178 * This method writes a PHP class from a table definition.
209 * Open a file for writing a PersistentObject definition to.
210 * This method opens a file for writing a PersistentObject definition to
211 * and writes the basic PHP open tag to it.
212 *
213 * @param string $dir The diretory to open the file in.
DiskKeyCache.php (https://gitlab.com/judielsm/Handora) PHP · 324 lines
PopBeforeSmtpPlugin.php (https://gitlab.com/Sigpot/AirSpot) PHP · 273 lines
PlainHTTPFetcher.php (https://github.com/Emaratilicious/Garden.git) PHP · 249 lines
Maildir.php (https://github.com/jorgenils/zend-framework.git) PHP · 222 lines
Forker.php (https://github.com/oskarp/4ME102.git) PHP · 201 lines
Privilege.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 191 lines
templateedit.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 237 lines
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.
154 $fh = fopen( $path, "wb" );
155 fwrite( $fh, "some values" );
156 fclose( $fh );
157 chmod( $path, 0 );
189 $fh = fopen( $path, "wb" );
190 fwrite( $fh, "some values" );
191 fclose( $fh );
192 chmod( $path, 0 );
php_http_server_generic.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 193 lines
1 <?php
2 //*******************************************************************
3 //php_http_server_generic represents a basic http server
17 if (!defined('PHP_HTTP_TOOLS_INCLUDE_PATH')) {
18 define('PHP_HTTP_TOOLS_INCLUDE_PATH', (dirname(__FILE__) . "/"));
19 }
23 define ('LF', "\n");
25 class php_http_server_generic {
26 var $httpStatusCodes;
36 function php_http_server_generic() {
37 //require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_http_status_codes.php');
38 //$this->httpStatusCodes =&new php_http_status_codes();
Stream.php (https://bitbucket.org/nbravo777/repo_ratchet.git) PHP · 296 lines
transport_connection.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 257 lines
1 <?php
2 /**
3 * File containing the ezcMailTransportConnection class
48 * transport connection.
49 *
50 * @todo The @ should be removed when PHP doesn't throw warnings for connect problems.
51 *
52 * @throws ezcMailTransportException
78 if ( ezcBaseFeatures::hasExtensionSupport( 'openssl' ) !== true )
79 {
80 throw new ezcBaseExtensionNotFoundException( 'openssl', null, "PHP not configured --with-openssl." );
81 }
82 $this->connection = @stream_socket_client( "ssl://{$server}:{$port}",
250 if ( is_resource( $this->connection ) )
251 {
252 fclose( $this->connection );
253 $this->connection = null;
254 }
MoFileLoader.php (https://github.com/israelnoguera/parejas.git) PHP · 169 lines
recaptcha.php (https://github.com/jeevangnanam/Hotel-Management-System.git) PHP · 140 lines
1 <?php
2 /**
3 * @link http://bakery.cakephp.org/articles/view/recaptcha-component-helper-for-cakephp
4 */
5 class RecaptchaComponent extends Object {
103 $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
104 $http_request .= "Content-Length: " . strlen($req) . "\r\n";
105 $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
106 $http_request .= "\r\n";
107 $http_request .= $req;
116 while ( !feof($fs) )
117 $response .= fgets($fs, 1160); // One TCP-IP packet
118 fclose($fs);
119 $response = explode("\r\n\r\n", $response, 2);
lib571.c (https://github.com/remotesyssupport/omnibus.git) C · 200 lines
103 if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
104 fprintf(stderr, "curl_global_init() failed\n");
105 fclose(protofile);
106 return TEST_ERR_MAJOR_BAD;
107 }
109 if ((curl = curl_easy_init()) == NULL) {
110 fprintf(stderr, "curl_easy_init() failed\n");
111 fclose(protofile);
112 curl_global_cleanup();
113 return TEST_ERR_MAJOR_BAD;
192 if(protofile)
193 fclose(protofile);
195 curl_easy_cleanup(curl);
udf-test-harness.h (https://gitlab.com/s9perween/Impala) C Header · 310 lines
62 template<typename RET>
63 static bool ValidateUdf(boost::function<RET(FunctionContext*)> fn,
64 const RET& expected, UdfPrepare init_fn = NULL, UdfClose close_fn = NULL,
65 const std::vector<AnyVal*>& constant_args = std::vector<AnyVal*>()) {
66 std::vector<FunctionContext::TypeDesc> types;
77 static bool ValidateUdf(boost::function<RET(FunctionContext*, const A1&)> fn,
78 const A1& a1, const RET& expected, UdfPrepare init_fn = NULL,
79 UdfClose close_fn = NULL,
80 const std::vector<AnyVal*>& constant_args = std::vector<AnyVal*>()) {
81 std::vector<FunctionContext::TypeDesc> types; // TODO
91 static bool ValidateUdf(boost::function<RET(FunctionContext*, int, const A1*)> fn,
92 const std::vector<A1>& a1, const RET& expected, UdfPrepare init_fn = NULL,
93 UdfClose close_fn = NULL,
94 const std::vector<AnyVal*>& constant_args = std::vector<AnyVal*>()) {
95 std::vector<FunctionContext::TypeDesc> types; // TODO
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)
function_sys_status.php (http://windowsfw.googlecode.com/svn/trunk/) PHP · 244 lines
1 <?php
3 include_once "function_xml_basic.php";
4 include_once "function_misc.php";
6 function GetCurrentSysVersion()
103 $contents = fread($handle, filesize ($file_name));
104 fclose($handle);
106 switch ($contents)
158 $contents = fread($handle, filesize ($file_name));
159 fclose($handle);
161 return $contents;
ezasynchronouspublisher.php (https://github.com/GunioRobot/ezpublish.git) PHP · 195 lines
1 #!/usr/bin/env php
2 <?php
12 declare( ticks=1 );
14 require 'autoload.php';
16 $cli = eZCLI::instance();
65 if ( flock( $pidFp, LOCK_EX | LOCK_NB ) === false )
66 {
67 fclose( $pidFp );
68 $script->shutdown( 2, "Another instance of the daemon is already running with the same pid file" );
69 }
89 // close the PID file, and reopen it after forking
90 fclose( $pidFp );
92 $pid = pcntl_fork();
plugins.php (https://github.com/sarriaroman/Cronos-Aion.git) PHP · 389 lines
1 <?php
3 /**
56 $fh = fopen($file, 'r');
57 $sql = fread($fh, filesize($file));
58 fclose($fh);
60 $sqls = explode(';', $sql);
178 $plg = Plugin::getByPath($plugin);
180 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '§ion=' . $section );
181 } else {
182 $permalink = getPermalink(0);
204 $plg = Plugin::getByPath($plugin);
206 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '§ion=' . $section . "&module=" . $module );
207 } else {
208 $permalink = getPermalink(0);
Stream.php (https://gitlab.com/reasonat/test8) PHP · 328 lines
BlobResult.cpp (https://bitbucket.org/rako/enb355linux.git) C++ · 943 lines
File.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 198 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 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 23775 2011-03-01 17:25:24Z ralph $
21 */
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);
vision_utilities.c (https://github.com/kscottz/ClassCrap.git) C · 486 lines
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(
test_main.cpp (https://github.com/blackberry/BB10-WebWorks-Framework.git) C++ · 248 lines
31 fprintf(new_file, "abcd");
32 fclose(new_file);
33 return 0;
34 }
40 std::string source_file = "/accounts/1000/shared/camera/abcdefg.hij";
41 std::string target_url = "http://bojap.com/omg/uploader.php";
43 std::string source_escaped(curl_easy_escape(curl, curl_easy_escape(curl, source_file.c_str(), 0), 0));
66 std::string source_file = "/accounts/1000/shared/documents/filetransfer_test.txt";
67 std::string target_url = "http://www.google.com/uploader.php";
69 std::string source_escaped(curl_easy_escape(curl, curl_easy_escape(curl, source_file.c_str(), 0), 0));
Functions.php (https://github.com/nigeldaley/moodle.git) PHP · 115 lines
1 <?php
2 /*
3 * Copyright (C) 2005 Alfresco, Inc.
27 // change by moodle
28 require_once($CFG->libdir."/alfresco/Service/Repository.php");
29 require_once($CFG->libdir."/alfresco/Service/Session.php");
98 socket_write($socket, $content, strlen($content));
99 }
100 fclose($handle);
102 // Read the response
103 $recv = socket_read ($socket, 2048, PHP_BINARY_READ);
104 $index = strpos($recv, "contentUrl");
105 if ($index !== false)
Jpeg.php (https://github.com/komola/ZendFramework.git) PHP · 152 lines
1 <?php
2 /**
3 * Zend Framework
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 /**
52 {
53 if (!function_exists('gd_info')) {
54 require_once 'Zend/Pdf/Exception.php';
55 throw new Zend_Pdf_Exception('Image extension is not installed.');
56 }
test7.c (https://bitbucket.org/toponado/nfs-proxy.git) C · 306 lines
configuration.php (https://github.com/pekka2/OpenCart-Migration-Upgrade-Tool.git) PHP · 233 lines
1 <?php
2 class ModelUpgradeConfiguration extends Model{
3 private $lang;
30 // frontend
31 $content = file_get_contents( DIR_DOCUMENT_ROOT . 'config.php' );
32 $check = $content;
36 $this->text .= $this->msg('<p><hr/></p>');
37 // FILE yourstore.com/config.php
38 $fp = file( DIR_DOCUMENT_ROOT . 'config.php' );
52 $content = implode( '', $fp );
54 if( is_writable( DIR_DOCUMENT_ROOT . 'config.php' ) ) {
55 if( !$this->simulate ) {
56 $fw = fopen( DIR_DOCUMENT_ROOT . 'config.php', 'wb' );
crypt.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 238 lines
1 <?php
2 /**
3 * @package Joomla.Platform
121 /*
122 * if a secure randomness generator exists and we don't
123 * have a buggy PHP version use it.
124 */
125 if (function_exists('openssl_random_pseudo_bytes')
126 && (version_compare(PHP_VERSION, '5.3.4') >= 0 || IS_WIN))
127 {
128 $sslStr = openssl_random_pseudo_bytes($length, $strong);
147 $handle = null;
149 // This is PHP 5.3.3 and up
150 if (function_exists('stream_set_read_buffer') && @is_readable('/dev/urandom'))
151 {
growl.gntp.php (https://gitlab.com/x33n/ampache) PHP · 107 lines
1 <?php
3 /*
68 $data .= 'Notification-Enabled: True' . "\r\n";
69 $data .= "\r\n\r\n";
70 $data .= 'Origin-Software-Name: growl.gntp.php' . "\r\n";
71 $data .= 'Origin-Software-Version: 1.0' . "\r\n";
72 $this->send($data);
88 }
89 $data .= "\r\n\r\n";
90 $data .= 'Origin-Software-Name: growl.gntp.php' . "\r\n";
91 $data .= 'Origin-Software-Version: 1.0' . "\r\n";
92 $this->send($data);
101 fwrite($fp,$data);
102 fread($fp,12);
103 fclose($fp);
104 }
105 }
direct.c (https://bitbucket.org/kohji/phantom-grape.git) C · 327 lines
File.php (https://github.com/grandison/budo16.git) PHP · 397 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 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 16212 2009-06-21 19:24:49Z thomas $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 // require_once "Zend/OpenId/Provider/Storage.php";
29 /**
81 Zend_OpenId_Exception::ERROR_STORAGE);
82 }
83 fclose($f);
84 if (($f = fopen($this->_dir.'/user.lock', 'w+')) === null) {
85 throw new Zend_OpenId_Exception(
fcFPP.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 220 lines
mailchimp_sts.class.php (https://github.com/GiveCampUK/SIS.git) PHP · 185 lines
1 <?php
3 class MailChimpSTS {
122 }
124 $payload = "POST " . $this->apiUrl["path"] . '/' . $method . ".php HTTP/1.0\r\n";
125 $payload .= "Host: " . $host . "\r\n";
126 $payload .= "User-Agent: MCAPI/" . $this->version . "\r\n";
152 $info = stream_get_meta_data($sock);
153 }
154 fclose($sock);
155 ob_end_clean();
156 if ($info["timed_out"]) {
File.php (https://bitbucket.org/baruffaldi/webapp-urltube.git) PHP · 397 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2008 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 8456 2008-02-29 11:01:12Z dmitry $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 require_once "Zend/OpenId/Provider/Storage.php";
29 /**
81 Zend_OpenId_Exception::ERROR_STORAGE);
82 }
83 fclose($f);
84 if (($f = fopen($this->_dir.'/user.lock', 'w+')) === null) {
85 throw new Zend_OpenId_Exception(
S_confedit.php (https://github.com/Mithgol/Nephtsys.git) PHP · 343 lines
1 <?php
2 /*\
3 / This is a part of PhFiTo (aka PHP Fido Tosser)
7 /// See docs/license for details
8 //
9 / $Id: S_confedit.php,v 1.5 2011/01/08 12:21:09 kocharin Exp $
10 \*/
208 if ($f = fopen($file,'w')) {
209 fwrite($f,join("",$lines));
210 fclose($f);
211 $CONFIG->Vars[$key.$num] = $newvalue;
212 return true;
231 $lines = array();
232 while ($l = fgets($f,1024)) $lines[] = chop($l);
233 fclose($f);
234 if ($exists):
235 $cl = $lines[$line-1];
File.php (https://github.com/su2921iw/ma3.git) PHP · 397 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 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 16212 2009-06-21 19:24:49Z thomas $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 require_once "Zend/OpenId/Provider/Storage.php";
29 /**
81 Zend_OpenId_Exception::ERROR_STORAGE);
82 }
83 fclose($f);
84 if (($f = fopen($this->_dir.'/user.lock', 'w+')) === null) {
85 throw new Zend_OpenId_Exception(
LoadFreenectData.m (https://gitlab.com/anima_tcs/kinectcapture) Objective C · 205 lines
54 FData.ErrorMessage = 'File Format Mismatch';
55 FData.Error = 1;
56 fclose(fp);
57 return;
58 end
75 FData.ErrorMessage = 'RGB Resolution Mismatch';
76 FData.Error = 2;
77 fclose(fp);
78 return;
79 end
90 FData.ErrorMessage = 'IR Resolution Mismatch';
91 FData.Error = 3;
92 fclose(fp);
93 return;
94 end
Functions.php (https://github.com/zendframework/ZF2Package.git) PHP · 218 lines
1 <?php
2 namespace phpdotnet\phd;
3 /* $Id: Functions.php 287923 2009-08-31 16:07:39Z moacir $ */
5 class Package_PHP_Functions extends Package_Generic_Manpage {
44 public function __construct() {
45 parent::__construct();
46 $this->registerFormatName("PHP-Functions");
47 $this->setTitle("PHP Manual");
91 public function header($index) {
92 return ".TH " . strtoupper($this->cchunk["funcname"][$index]) . " 3 \"" . $this->date . "\" \"PHP Documentation Group\" \"" . $this->bookName . "\"";
93 }
class.wsdlcache.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 209 lines
1 <?php
2 /*
3 The NuSOAP project home is:
13 * @author Scott Nichol <snichol@users.sourceforge.net>
14 * @author Ingo Fischer <ingo@apollon.de>
15 * @version $Id: class.wsdlcache.php,v 1.7 2007/04/17 16:34:03 snichol Exp $
16 * @access public
17 */
100 if ($fp) {
101 $s = implode("", @file($filename));
102 fclose($fp);
103 $this->debug("Got $wsdl ($filename) from cache");
104 } else {
153 }
154 fputs($fp, $s);
155 fclose($fp);
156 $this->debug("Put $wsdl_instance->wsdl ($filename) in cache");
157 $this->releaseMutex($filename);
Inxmail.php (https://github.com/Paratron/KISS-tools.git) PHP · 105 lines
StaticProperties.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 203 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
38 'Magento\TestFramework\Helper\Bootstrap',
39 'Magento\TestFramework\Event\Magento',
40 'Magento\TestFramework\Event\PhpUnit',
41 'Magento\TestFramework\Annotation\AppIsolation',
42 'Magento\TestFramework\Workaround\Cleanup\StaticProperties',
131 public static function backupStaticVariables()
132 {
133 $classFiles = Files::init()->getPhpFiles(
134 Files::INCLUDE_APP_CODE
135 | Files::INCLUDE_LIBS
145 preg_match($classPattern, $code, $class);
146 if (!isset($namespace[0]) || !isset($class[0])) {
147 fclose($file);
148 continue;
149 }
Log.php (https://bitbucket.org/tduarte/atmailopen.git) PHP · 216 lines
1 <?php
2 // +----------------------------------------------------------------+
3 // | Log.php |
4 // +----------------------------------------------------------------+
5 // | AtMail Open - Licensed under the Apache 2.0 Open-source License|
6 // | http://opensource.org/licenses/apache2.0.php |
7 // +----------------------------------------------------------------+
8 // | Date: Febuary 2005 |
9 // +----------------------------------------------------------------+
11 require_once('header.php');
13 define ('QUERY_ERROR', 'Error in SQL Query');
15 require_once('Config.php');
17 class Log
api.php (http://na-agent.googlecode.com/svn/trunk/) PHP · 307 lines
File.php (https://github.com/gryzz/crystal_magento.git) PHP · 397 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 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 16212 2009-06-21 19:24:49Z thomas $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 #require_once "Zend/OpenId/Provider/Storage.php";
29 /**
81 Zend_OpenId_Exception::ERROR_STORAGE);
82 }
83 fclose($f);
84 if (($f = fopen($this->_dir.'/user.lock', 'w+')) === null) {
85 throw new Zend_OpenId_Exception(
test_ext_zlib.cpp (https://github.com/tmjnaid/hiphop-php.git) C++ · 202 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 */
Config.cpp (https://gitlab.com/DELTA_37/Config) C++ · 746 lines
CSV.php
(https://PHPExcel.svn.codeplex.com/svn)
PHP · 338 lines
✨ Summary
This PHP code defines a class PHPExcel_Reader_CSV
that reads a CSV file and populates a PHPExcel object with its data. It handles various settings such as delimiter, enclosure, line ending, and sheet index. The class provides methods to set these settings and returns the populated PHPExcel object.
This PHP code defines a class PHPExcel_Reader_CSV
that reads a CSV file and populates a PHPExcel object with its data. It handles various settings such as delimiter, enclosure, line ending, and sheet index. The class provides methods to set these settings and returns the populated PHPExcel object.
37 /** PHPExcel */
38 require_once PHPEXCEL_ROOT . 'PHPExcel.php';
40 /** PHPExcel_Reader_IReader */
43 /** PHPExcel_Worksheet */
44 require_once PHPEXCEL_ROOT . 'PHPExcel/Worksheet.php';
46 /** PHPExcel_Cell */
47 require_once PHPEXCEL_ROOT . 'PHPExcel/Cell.php';
49 /** PHPExcel_Reader_DefaultReadFilter */
50 require_once PHPEXCEL_ROOT . 'PHPExcel/Reader/DefaultReadFilter.php';
pl-sql.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 398 lines
pl-sql.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 503 lines
qbezier.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 702 lines
531 qreal length = qreal(0.0);
533 addIfClose(&length, error);
535 return length;
536 }
538 void QBezier::addIfClose(qreal *length, qreal error) const
539 {
540 QBezier left, right; /* bez poly splits */
551 if((len-chord) > error) {
552 split(&left, &right); /* split in two */
553 left.addIfClose(length, error); /* try left side */
554 right.addIfClose(length, error); /* try right side */
D3DDRV.CPP
(https://jetpp.svn.sourceforge.net/svnroot/jetpp)
C++ · 606 lines
✨ Summary
This C++ code is part of a game engine, specifically for Direct3D graphics rendering. It provides functions to handle various graphical operations such as:
- Capturing the screen as an image
- Setting fog effects in the scene
- Drawing text on the screen
- Locking and unlocking the back buffer for rendering
These functions are likely used within a larger game engine framework to control the visual output of the application.
This C++ code is part of a game engine, specifically for Direct3D graphics rendering. It provides functions to handle various graphical operations such as:
- Capturing the screen as an image
- Setting fog effects in the scene
- Drawing text on the screen
- Locking and unlocking the back buffer for rendering
These functions are likely used within a larger game engine framework to control the visual output of the application.
lauxlib.c
(https://jetpp.svn.sourceforge.net/svnroot/jetpp)
C · 654 lines
✨ Summary
This C code implements a part of the Lua programming language interpreter. It provides functions for loading files, strings, and buffers into the Lua state, as well as creating a new Lua state with an error handler. The code is written in a style consistent with the Lua C API, suggesting it’s intended to be used within the Lua project or by developers familiar with the Lua API.
This C code implements a part of the Lua programming language interpreter. It provides functions for loading files, strings, and buffers into the Lua state, as well as creating a new Lua state with an error handler. The code is written in a style consistent with the Lua C API, suggesting it’s intended to be used within the Lua project or by developers familiar with the Lua API.
572 }
573 if (c == LUA_SIGNATURE[0] && lf.f != stdin) { /* binary file? */
574 fclose(lf.f);
575 lf.f = fopen(filename, "rb"); /* reopen in binary mode */
576 if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
582 status = lua_load(L, getF, &lf, lua_tostring(L, -1));
583 readstatus = ferror(lf.f);
584 if (lf.f != stdin) fclose(lf.f); /* close file (even in case of errors) */
585 if (readstatus) {
586 lua_settop(L, fnameindex); /* ignore results from `lua_load' */
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>