PageRenderTime 752ms queryTime 52ms sortTime 74ms getByIdsTime 446ms findMatchingLines 93ms

100+ results results for 'php fwrite' (752 ms)

Not the results you expected?
File.php https://gitlab.com/rsilveira1987/Expresso | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
82     */
                    
83    abstract protected function _fwrite($data, $length=null);
                    
84
                    
117    {
                    
118        return $this->_fwrite(chr($byte), 1);
                    
119    }
                    
141    {
                    
142        $this->_fwrite($data, $num);
                    
143    }
                    
170        settype($value, 'integer');
                    
171        $this->_fwrite( chr($value>>24 & 0xFF) .
                    
172                        chr($value>>16 & 0xFF) .
                    
                
File.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
21 */
                    
82     */
                    
83    abstract protected function _fwrite($data, $length=null);
                    
84
                    
117    {
                    
118        return $this->_fwrite(chr($byte), 1);
                    
119    }
                    
141    {
                    
142        $this->_fwrite($data, $num);
                    
143    }
                    
170        settype($value, 'integer');
                    
171        $this->_fwrite( chr($value>>24 & 0xFF) .
                    
172                        chr($value>>16 & 0xFF) .
                    
                
Ntp.php https://github.com/Exercise/zf2.git | PHP | 434 lines
                    
1<?php
                    
2/**
                    
246
                    
247        fwrite($this->_socket, $data);
                    
248        stream_set_timeout($this->_socket, TimeSync::$options['timeout']);
                    
                
File.php https://github.com/Enrise/Zend.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
                    
21 */
                    
82     */
                    
83    abstract protected function _fwrite($data, $length=null);
                    
84
                    
117    {
                    
118        return $this->_fwrite(chr($byte), 1);
                    
119    }
                    
141    {
                    
142        $this->_fwrite($data, $num);
                    
143    }
                    
170        settype($value, 'integer');
                    
171        $this->_fwrite( chr($value>>24 & 0xFF) .
                    
172                        chr($value>>16 & 0xFF) .
                    
                
backuplib.php https://github.com/cwaclawik/moodle.git | PHP | 337 lines
                    
1<?PHP //$Id$
                    
2    //This php script contains all the stuff to backup/restore
                    
240        // $excluded_tags : fields which will NOT be backed up from the records
                    
241        // $more_backup   : optional PHP code to be eval(uated) for each record
                    
242        // If any of the "fwrite" statements fail,
                    
242        // If any of the "fwrite" statements fail,
                    
243        // no further "fwrite"s will be attempted
                    
244        // and the function returns "false".
                    
250            if ($records_tag) {
                    
251                $status = $status && fwrite($bf, start_tag($records_tag, $level, true));
                    
252                $level++;
                    
253                foreach ($records_tags as $tag) {
                    
254                    $status = $status && fwrite($bf, full_tag($tag, $level, false, $value));
                    
255                }
                    
259                if ($record_tag) {
                    
260                    $status = $status && fwrite($bf, start_tag($record_tag, $level, true));
                    
261                    $level++;
                    
                
ArrayCharacterStream.php https://bitbucket.org/laborautonomo/laborautonomo-site.git | PHP | 317 lines
                    
1<?php
                    
2
                    
199
                    
200    $fp = fopen('php://memory', 'w+b');
                    
201    fwrite($fp, $chars);
                    
                
class-wp-filesystem-ftpsockets.php https://github.com/lixinyang/weixiao001.com.git | PHP | 327 lines
                    
1<?php
                    
2/**
                    
26		//Check if possible to use ftp functions.
                    
27		if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
                    
28				return false;
                    
124
                    
125		fwrite($temphandle, $contents);
                    
126		fseek($temphandle, 0); //Skip back to the start of the file being written to
                    
                
FileManager.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 451 lines
                    
1<?php
                    
2
                    
7/**
                    
8 * @file classes/file/FileManager.inc.php
                    
9 *
                    
18
                    
19// $Id: FileManager.inc.php,v 1.10 2009/09/29 23:39:13 asmecher Exp $
                    
20
                    
122		if (($f = fopen($dest, 'wb'))===false) $success = false;
                    
123		if ($success && fwrite($f, $contents)===false) $success = false;
                    
124		@fclose($f);
                    
442		// FIXME Check for evil
                    
443		if (!isset($fileExtension) || strstr($fileExtension, 'php') || strlen($fileExtension) > 6 || !preg_match('/^\w+$/', $fileExtension)) {
                    
444			$fileExtension = 'txt';
                    
                
admin.php https://github.com/drbowen/openemr.git | PHP | 173 lines
                    
1<?php
                    
2include_once ('../../globals.php'); 
                    
2include_once ('../../globals.php'); 
                    
3include_once("../../../library/formdata.inc.php");
                    
4?>
                    
4?>
                    
5<?php
                    
6if ($_POST['export']) {
                    
14		        $tmp = "<category>$tmp</category>"."\n";
                    
15		        fwrite($temp, $tmp);
                    
16		        $query2 = "select id,subcategory from ".mitigateSqlTableUpperCase("form_CAMOS_subcategory")." where category_id=".$result1['id'];
                    
20		                $tmp = "<subcategory>$tmp</subcategory>"."\n";
                    
21		                fwrite($temp, $tmp);
                    
22		                $query3 = "select item, content from ".mitigateSqlTableUpperCase("form_CAMOS_item")." where subcategory_id=".$result2['id'];
                    
26		                        $tmp = "<item>$tmp</item>"."\n";
                    
27		                        fwrite($temp, $tmp);
                    
28		                        $tmp = preg_replace(array("/\n/","/\r/"),array("\\\\n","\\\\r"),$result3['content']);
                    
                
lib.php https://github.com/200896596/moodle.git | PHP | 184 lines
                    
1<?php
                    
2
                    
28
                    
29require_once($CFG->libdir.'/webdavlib.php');
                    
30
                    
73        $fp = fopen($path, 'wb');
                    
74        fwrite($fp, $buffer);
                    
75        return array('path'=>$path);
                    
                
User.php https://github.com/ThiloWitt/core.git | PHP | 225 lines
                    
1<?php
                    
2/**
                    
202            flock($PageLockFile, LOCK_EX);
                    
203            fwrite($PageLockFile, "This is a locking file for synchronizing access to the PageLock module. Please do not delete.");
                    
204            fflush($PageLockFile);
                    
                
OLE_Root.php https://PHPExcel.svn.codeplex.com/svn | PHP | 482 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP Version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2002 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 2.02 of the PHP license,      |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
22
                    
23require_once 'PHPExcel/Shared/OLE/OLE_PPS.php';
                    
24
                    
31*/
                    
32class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
                    
33	{
                    
                
class-wp-filesystem-ftpsockets.php https://bitbucket.org/zenoalbisser/webkit.git | PHP | 327 lines
                    
1<?php
                    
2/**
                    
29		//Check if possible to use ftp functions.
                    
30		if( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
                    
31				return false;
                    
134
                    
135		fwrite($temphandle, $contents);
                    
136		fseek($temphandle, 0); //Skip back to the start of the file being written to
                    
                
tmx.class.php https://github.com/Stormfaint/TMX-Reader---Writer.git | PHP | 301 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Reader et Writer de fichiers de TMX en PHP
                    
5 *
                    
5 *
                    
6 * La classe permet de lire, de modifier et créer un fichier de traduction au format TMX en PHP
                    
7 *
                    
75     * @param  boolean $debug
                    
76     * @throws Exception si l'extension libxml n'est pas activée dans PHP, nécessaire pour XMLReader et XMLWriter
                    
77     * @throws Exception si le fichier n'est accessible en écriture
                    
85			if($this->_debug)
                    
86				throw new Exception('PHP extension libxml is required : http://www.php.net/manual/fr/book.libxml.php');
                    
87			else return false;
                    
197		$file = @fopen($this->_file, 'w');
                    
198		@fwrite($file, $writer->outputMemory(true));
                    
199		return $this;
                    
                
BaseTestCaseORM.php https://gitlab.com/Snizer/PI-DEV-TUNISIAMALL3A6-WEB | PHP | 264 lines
                    
1<?php
                    
2
                    
21 * @link http://www.gediminasm.org
                    
22 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
23 */
                    
23 */
                    
24abstract class BaseTestCaseORM extends \PHPUnit_Framework_TestCase
                    
25{
                    
152                if (($file = fopen($fileName, 'w+')) !== false) {
                    
153                    fwrite($file, $output);
                    
154                    fclose($file);
                    
                
module_installer.php https://github.com/yellow1912/module-manager.git | PHP | 229 lines
                    
16
                    
17	// php4 constructor
                    
18	function module_installer(){
                    
27		$this->module_db_path = $this->module_path.'db/';
                    
28		$this->module_php_path = $this->module_path.'php/';
                    
29		$this->module_version_file_path = $this->module_path.'current_version.txt';		
                    
41		$sql = 'SELECT * FROM '.TABLE_MODULE_VERSION_TRACKER.' WHERE module_code=\''.$this->module_code.'\' LIMIT 1';
                    
42		require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'ri_utility.php');
                    
43		$this->module_db_info = RIUtility::dbResultToArray($db->Execute($sql), true);
                    
108			if(!empty($this->module_php_patch_files[$patch_level])){
                    
109				require_once($this->module_php_path.$this->module_php_patch_files[$patch_level]);
                    
110				$update_obj = $this->_get_object("update_$patch_level");
                    
168	function get_php_patch_files(){
                    
169		$this->module_php_patch_files = $this->_get_patch_files($this->module_php_path, 'php');
                    
170	}
                    
                
theme-editor.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 246 lines
                    
83	if ( is_writeable( $file ) ) {
                    
84		//is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
                    
85		$f = fopen( $file, 'w+' );
                    
172	<?php if ( $theme->parent() ) : ?>
                    
173	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
174	<?php endif; ?>
                    
189?>
                    
190		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
191<?php
                    
211		<?php echo $docs_select; ?>
                    
212		<input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
213		</div>
                    
217		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
218			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
219			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
Apns.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 391 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Mobile_Push_Abstract **/
                    
24#require_once 'Zend/Mobile/Push/Abstract.php';
                    
25
                    
26/** Zend_Mobile_Push_Message_Apns **/
                    
27#require_once 'Zend/Mobile/Push/Message/Apns.php';
                    
28
                    
171        if (!is_resource($this->_socket)) {
                    
172            #require_once 'Zend/Mobile/Push/Exception/ServerUnavailable.php';
                    
173            throw new Zend_Mobile_Push_Exception_ServerUnavailable(sprintf('Unable to connect: %s: %d (%s)',
                    
205    protected function _write($payload) {
                    
206        return @fwrite($this->_socket, $payload);
                    
207    }
                    
328        if ($ret === false) {
                    
329            #require_once 'Zend/Mobile/Push/Exception/ServerUnavailable.php';
                    
330            throw new Zend_Mobile_Push_Exception_ServerUnavailable('Unable to send message');
                    
                
Process.php https://github.com/macolu/assetic.git | PHP | 380 lines
                    
1<?php
                    
2
                    
30 * Process is a thin wrapper around proc_* functions to ease
                    
31 * start independent PHP processes.
                    
32 *
                    
66        if (!function_exists('proc_open')) {
                    
67            throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
                    
68        }
                    
94     *
                    
95     * @param Closure|string|array $callback A PHP callback to run whenever there is some
                    
96     *                                       output available on STDOUT or STDERR
                    
159            if ($w) {
                    
160                $written = fwrite($writePipes[0], (binary) substr($this->stdin, $stdinOffset), 8192);
                    
161                if (false !== $written) {
                    
                
theme-editor.php https://github.com/mhoofman/wordpress-heroku.git | PHP | 243 lines
                    
169	<?php if ( $theme->parent() ) : ?>
                    
170	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
171	<?php endif; ?>
                    
186?>
                    
187		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
188<?php
                    
208		<?php echo $docs_select; ?>
                    
209		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
210		</div>
                    
214		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
215			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
216			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
217		<?php endif; ?>
                    
218<?php
                    
219	if ( is_writeable( $file ) ) :
                    
                
ezfile.php https://github.com/lserwatka/ezpublish.git | PHP | 249 lines
                    
1<?php
                    
2//
                    
34/*!
                    
35 \class eZFile ezfile.php
                    
36 \ingroup eZUtils
                    
95            if ( $data )
                    
96                fwrite( $file, $data );
                    
97            fclose( $file );
                    
163
                    
164        /* PHP function is_writable() doesn't work correctly on Windows NT descendants.
                    
165         * So we have to use the following hack on those OSes.
                    
186        /* On windows we need to unlink the destination file first */
                    
187        if ( strtolower( substr( PHP_OS, 0, 3 ) ) == 'win' )
                    
188        {
                    
                
Preview.php https://github.com/ksecor/civicrm.git | PHP | 228 lines
                    
1<?php
                    
2
                    
35
                    
36require_once 'CRM/Core/Form.php';
                    
37require_once 'CRM/Member/Import/Parser/Membership.php';
                    
214            if ( $fd = fopen( $errorFile, 'w' ) ) {
                    
215                fwrite($fd, implode('\n', $errorMessage));
                    
216            }
                    
                
dashboard.php https://github.com/jimmytidey/jimmytidey.co.uk.git | PHP | 170 lines
                    
1<?php
                    
2/**
                    
37	$path = false;
                    
38	if ( file_exists( get_stylesheet_directory() . '/header.php' ) ) {
                    
39		// theme or child theme
                    
41	}
                    
42	elseif ( file_exists( get_template_directory() . '/header.php' ) ) {
                    
43		// parent theme in case of a child theme
                    
47	if ( is_string( $path ) && $path !== '' ) {
                    
48		$fcontent    = file_get_contents( $path . '/header.php' );
                    
49		$msg         = '';
                    
49		$msg         = '';
                    
50		$backup_file = date( 'Ymd-H.i.s-' ) . 'header.php.wpseobak';
                    
51		if ( ! file_exists( $path . '/' . $backup_file ) ) {
                    
53			if ( $backupfile ) {
                    
54				fwrite( $backupfile, $fcontent );
                    
55				fclose( $backupfile );
                    
                
HtaccessUtils.php https://gitlab.com/iamgraeme/royalmile | PHP | 273 lines
                    
1<?php
                    
2namespace WebSharks\ZenCache;
                    
243    // Note: rewind() necessary here because we fread() above.
                    
244    if (($require_marker && $_have_marker === false) || !rewind($htaccess['fp']) || !ftruncate($htaccess['fp'], 0) || !fwrite($htaccess['fp'], $htaccess['file_contents'])) {
                    
245        flock($htaccess['fp'], LOCK_UN);
                    
                
Convert.php https://github.com/usagi-project/mynets1.git | PHP | 243 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
116                    $fp = fopen($file_path . '/topic_edatetime_update.txt', 'w+');
                    
117                    fwrite($fp, date(time()));
                    
118                    fclose($fp);
                    
131                    $fp = fopen($file_path . '/diary_commentno_update.txt', 'w+');
                    
132                    fwrite($fp, date(time()));
                    
133                    fclose($fp);
                    
187                    $fp = fopen($file_path . '/topic_edatetime_update.txt', 'w+');
                    
188                    fwrite($fp, date(time()));
                    
189                    fclose($fp);
                    
202                    $fp = fopen($file_path . '/diary_commentno_update.txt', 'w+');
                    
203                    fwrite($fp, date(time()));
                    
204                    fclose($fp);
                    
217                    $fp = fopen($file_path . '/diary_commentcount_update.txt', 'w+');
                    
218                    fwrite($fp, date(time()));
                    
219                    fclose($fp);
                    
                
class-wp-image-editor.php https://gitlab.com/Gashler/dp | PHP | 403 lines
                    
1<?php
                    
2/**
                    
346
                    
347			fwrite( $fp, $contents );
                    
348			fclose( $fp );
                    
                
Process.php https://github.com/arturosevilla/Symfony2-Example.git | PHP | 355 lines
                    
1<?php
                    
2
                    
15 * Process is a thin wrapper around proc_* functions to ease
                    
16 * start independent PHP processes.
                    
17 *
                    
51        if (!function_exists('proc_open')) {
                    
52            throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
                    
53        }
                    
79     *
                    
80     * @param Closure|string|array $callback A PHP callback to run whenever there is some
                    
81     *                                       output available on STDOUT or STDERR
                    
106
                    
107        // Workaround for http://bugs.php.net/bug.php?id=51800
                    
108            $stderrPipeMode = 'a';
                    
121        if (null !== $this->stdin) {
                    
122            fwrite($pipes[0], (binary) $this->stdin);
                    
123        }
                    
                
Root.php https://gitlab.com/albert925/lading-ach | PHP | 453 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP Version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2002 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 2.02 of the PHP license,      |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
10// | available at through the world-wide-web at                           |
                    
11// | http://www.php.net/license/2_02.txt.                                 |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
29*/
                    
30class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
                    
31	{
                    
                
klargefile.class.php http://awarenet.googlecode.com/svn/trunk/ | PHP | 327 lines
                    
35//+
                    
36//+	The metadata filename will be ./data/transfer/meta/filename-as-alias.xml.php
                    
37
                    
142			$hash = sha1($raw);
                    
143			$fileName = 'data/transfer/parts/' . $kapenta->time() . '_' . $hash . '.part.php';
                    
144			$this->parts[$i] = array(
                    
191			$partBin = base64_decode($part64);
                    
192			fwrite($fH, $partBin);
                    
193		}
                    
259		$path = str_replace('\\', '-bs-', $path);
                    
260		$path = 'data/transfer/meta/' . $path . '.xml.php';
                    
261		return $path;
                    
                
write.metaflac.php https://gitlab.com/x33n/ampache | PHP | 162 lines
                    
1<?php
                    
2/////////////////////////////////////////////////////////////////
                    
10//                                                             //
                    
11// write.metaflac.php                                          //
                    
12// module for writing metaflac tags                            //
                    
32		if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
                    
33			$this->errors[] = 'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not written';
                    
34			return false;
                    
41				foreach ($value as $commentdata) {
                    
42					fwrite($fpcomments, $this->CleanmetaflacName($key).'='.$commentdata."\n");
                    
43				}
                    
106		if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
                    
107			$this->errors[] = 'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not deleted';
                    
108			return false;
                    
                
CSV.php https://gitlab.com/hoanghung.dev/aloads | PHP | 352 lines
                    
27 */
                    
28class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
                    
29{
                    
89     *
                    
90     * @param    PHPExcel    $phpExcel    PHPExcel object
                    
91     */
                    
108        $saveDebugLog = PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog();
                    
109        PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false);
                    
110        $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
                    
110        $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
                    
111        PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
                    
112
                    
150        PHPExcel_Calculation::setArrayReturnType($saveArrayReturnType);
                    
151        PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog);
                    
152    }
                    
                
Proxy.php https://github.com/jacknicole/sugarcrm_dev.git | PHP | 284 lines
                    
1<?php
                    
2
                    
26 */
                    
27require_once 'Zend/Uri/Http.php';
                    
28/**
                    
30 */
                    
31require_once 'Zend/Http/Client.php';
                    
32/**
                    
34 */
                    
35require_once 'Zend/Http/Client/Adapter/Socket.php';
                    
36
                    
125        if (! $this->socket) {
                    
126            require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
127            throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are not connected");
                    
133        if ($this->connected_to[0] != "tcp://$host" || $this->connected_to[1] != $port) {
                    
134            require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
135            throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are connected to the wrong proxy server");
                    
                
recaptcha.class.php https://bitbucket.org/orchdork10159/dnsman.ly.git | PHP | 271 lines
                    
1<?php
                    
2/**
                    
25 *
                    
26 * Based off of recaptchalib.php by Mike Crawford and Ben Maurer. Changes include converting to OOP and making a class.
                    
27 *
                    
82        $http_request .= "Content-Length: " . strlen($req) . "\r\n";
                    
83        $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
                    
84        $http_request .= "\r\n";
                    
91
                    
92        fwrite($fs, $http_request);
                    
93        while (!feof($fs)) {
                    
                
inclued.examples-implementation.html https://bitbucket.org/thncr/manuals.git | HTML | 95 lines
                    
11 <div class="up"><a href="inclued.examples.html">范例</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="inclued.examples-implementation" class="section">
                    
23<div class="phpcode"><code><span style="color: #000000">
                    
24<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;File&nbsp;to&nbsp;store&nbsp;the&nbsp;inclued&nbsp;information<br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'/tmp/wp.ser'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$clue&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">inclued_get_data</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$clue</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">serialize</span><span style="color: #007700">(</span><span style="color: #0000BB">$clue</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
                    
25</span>
                    
32   Now that some data exists, it&#039;s time to make sense of it in the form of
                    
33   a graph. The inclued extension includes a PHP file named
                    
34   <var class="filename">gengraph.php</var> that creates a dot file that 
                    
46<div class="shellcode"><pre class="shellcode"># First, create the dot file
                    
47$ php gengraph.php -i /tmp/wp.ser -o wp.dot
                    
48
                    
65<div class="phpcode"><code><span style="color: #000000">
                    
66<span style="color: #0000BB">&lt;?php<br />$path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'inclued.dumpdir'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">$path&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #0000BB">$path</span><span style="color: #007700">))&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Path:&nbsp;</span><span style="color: #0000BB">$path</span><span style="color: #DD0000">"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$inclues&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">GlobIterator</span><span style="color: #007700">(</span><span style="color: #0000BB">$path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">DIRECTORY_SEPARATOR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'inclued*'</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$inclues</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">count</span><span style="color: #007700">()&nbsp;===&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'No&nbsp;clues&nbsp;today'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(</span><span style="color: #0000BB">$inclues&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$inclue</span><span style="color: #007700">)&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'Inclued&nbsp;file:&nbsp;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$inclue</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getFilename</span><span style="color: #007700">(),&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">$inclue</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getPathname</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$data</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$inc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">unserialize</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'&nbsp;--&nbsp;filename:&nbsp;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$inc</span><span style="color: #007700">[</span><span style="color: #DD0000">'request'</span><span style="color: #007700">][</span><span style="color: #DD0000">'SCRIPT_FILENAME'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'&nbsp;--&nbsp;number&nbsp;of&nbsp;includes:&nbsp;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">$inc</span><span style="color: #007700">[</span><span style="color: #DD0000">'includes'</span><span style="color: #007700">]),&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'I&nbsp;am&nbsp;totally&nbsp;clueless&nbsp;today.'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
                    
67</span>
                    
                
Abstract.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 411 lines
                    
1<?php
                    
2
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
21 * @version    $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
22 */
                    
27 */
                    
28// require_once 'Zend/Validate.php';
                    
29
                    
33 */
                    
34// require_once 'Zend/Validate/Hostname.php';
                    
35
                    
46 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
47 * @version    $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
48 * @todo Implement proxy settings
                    
141             */
                    
142            // require_once 'Zend/Mail/Protocol/Exception.php';
                    
143            throw new Zend_Mail_Protocol_Exception(join(', ', $this->_validHost->getMessages()));
                    
                
LoggerAppenderSocket.php https://github.com/samar-tmr/MyVenture.git | PHP | 263 lines
                    
1<?php
                    
2/**
                    
17 *
                    
18 * @package log4php
                    
19 */
                    
31 * - useXml             - true, if xml should be transmitted.
                    
32 *                        false, if a serialized php object should be transmitted
                    
33 *
                    
38 * 
                    
39 * {@example ../../examples/php/appender_socket.php 19}
                    
40 * 
                    
43 * @version $Revision: 1062667 $
                    
44 * @package log4php
                    
45 * @subpackage appenders
                    
60	 * Target host. On how to define remote hostaname see 
                    
61	 * {@link PHP_MANUAL#fsockopen}
                    
62	 * @var string 
                    
                
Csv.php https://bitbucket.org/moodle/moodle.git | PHP | 404 lines
                    
1<?php
                    
2
                    
2
                    
3namespace PhpOffice\PhpSpreadsheet\Writer;
                    
4
                    
4
                    
5use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
                    
6use PhpOffice\PhpSpreadsheet\Spreadsheet;
                    
10    /**
                    
11     * PhpSpreadsheet object.
                    
12     *
                    
35     */
                    
36    private $lineEnding = PHP_EOL;
                    
37
                    
84    /**
                    
85     * Save PhpSpreadsheet to file.
                    
86     *
                    
                
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
                    
29/**
                    
30 * PHPExcel_CachedObjectStorage_PHPTemp
                    
31 *
                    
33 * @package    PHPExcel_CachedObjectStorage
                    
34 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
35 */
                    
35 */
                    
36class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {
                    
37
                    
64			$offset = ftell($this->_fileHandle);
                    
65			fwrite($this->_fileHandle, serialize($this->_currentObject));
                    
66			$this->_cellCache[$this->_currentObjectID]	= array('ptr' => $offset,
                    
                
Printer.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 211 lines
                    
1<?php
                    
2/**
                    
37 * @category   Testing
                    
38 * @package    PHPUnit
                    
39 * @author     Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
40 * @copyright  2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
41 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
42 * @version    SVN: $Id: Printer.php 4930 2009-06-06 08:18:48Z sb $
                    
42 * @version    SVN: $Id: Printer.php 4930 2009-06-06 08:18:48Z sb $
                    
43 * @link       http://www.phpunit.de/
                    
44 * @since      File available since Release 2.0.0
                    
46
                    
47require_once 'PHPUnit/Util/Filter.php';
                    
48
                    
48
                    
49PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
50
                    
                
lastRSS.php https://github.com/JxLib/jxlib.github.com.git | PHP | 226 lines
                    
1<?php
                    
2/*
                    
5 
                    
6 Simple yet powerfull PHP class to parse RSS files.
                    
7 
                    
31* lastRSS
                    
32* Simple yet powerfull PHP class to parse RSS files.
                    
33*/
                    
70				if ($f = @fopen($cache_file, 'w')) {
                    
71					fwrite ($f, $serialized, strlen($serialized));
                    
72					fclose($f);
                    
                
main.php http://creative-portal.googlecode.com/svn/trunk/ | PHP | 257 lines
                    
1<?php
                    
2/**
                    
25    {
                    
26        require_once ( NV_ROOTDIR . "/includes/class/upload.class.php" );
                    
27        $upload = new upload( $admin_info['allow_files_type'], $global_config['forbid_extensions'], $global_config['forbid_mimes'], NV_UPLOAD_MAX_FILESIZE, NV_MAX_WIDTH, NV_MAX_HEIGHT );
                    
47            {
                    
48                include ( NV_ROOTDIR . "/includes/class/geturl.class.php" );
                    
49                $getContent = new UrlGetContents( $global_config );
                    
54                {
                    
55                    @fwrite( $handle2, $content );
                    
56                    @fclose( $handle2 );
                    
101$(function(){
                    
102	$("#imgfolder").load("' . NV_BASE_ADMINURL . 'index.php?' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=folderlist&path=' . $path . '&currentpath=' . $currentpath . '");
                    
103	$("div#imglist").html("<span style=\'color:red\'><img src=\'' . NV_BASE_SITEURL . 'images/load.gif\'/> please wait...</span>");
                    
103	$("div#imglist").html("<span style=\'color:red\'><img src=\'' . NV_BASE_SITEURL . 'images/load.gif\'/> please wait...</span>");
                    
104	$("div#imglist").html("<iframe src=\"' . NV_BASE_ADMINURL . 'index.php?' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=imglist&path=' . $currentpath . '&type=' . $type . '&imgfile=' . $selectedfile . '\" style=\"width:590px;height:300px;border:none\"></iframe>");
                    
105	$("select[name=imgtype]").change(function(){
                    
                
FileTarget.php https://gitlab.com/nitm/yii2-module | PHP | 240 lines
                    
1<?php
                    
2/**
                    
116		{
                    
117			if(fwrite($this->handle, wordwrap($text, 512, "\n\n")) === false)
                    
118			{
                    
                
functions.php https://github.com/halka139/html-warrior.git | PHP | 530 lines
                    
1<?php
                    
2
                    
187 * Unified javascript tag. Used mainly in script partial.
                    
188 * @param string $file required URI to js. Js extension can be omitted. PHP
                    
189 * extension can be used.
                    
196    $path = preg_replace('/' . $tpl_escaped . '$/isU', '', $file);
                    
197    if (strpos($tpl, '.php') === false) {
                    
198        $path .= $tpl . '.js';
                    
216    $file = str_replace($template_name, "", $file);
                    
217    if (strpos($template_name, ".php") === false) {
                    
218        $file .= $template_name . ".css";
                    
227    $fh = fopen($path, 'w') or die("can't open file");
                    
228    fwrite($fh, $content);
                    
229    fclose($fh);
                    
440
                    
441    require_once($htmlwarrior->config['basepath'] . $htmlwarrior->config['path_code'] . '/classes/' . $classname . '.php');
                    
442    $instance = new $classname();
                    
                
PdfPageEvent.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 183 lines
                    
108 */
                    
109    public void onParagraph(PdfWriter writer, Document document, float paragraphPosition);
                    
110    
                    
132 */
                    
133    public void onChapter(PdfWriter writer,Document document,float paragraphPosition, Paragraph title);
                    
134    
                    
143 */
                    
144    public void onChapterEnd(PdfWriter writer,Document document,float paragraphPosition);
                    
145    
                    
157 */
                    
158    public void onSection(PdfWriter writer,Document document,float paragraphPosition, int depth, Paragraph title);
                    
159    
                    
168 */
                    
169    public void onSectionEnd(PdfWriter writer,Document document,float paragraphPosition);
                    
170    
                    
                
plugin-editor.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 255 lines
                    
87		if ( ! is_plugin_active($file) )
                    
88			activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
                    
89
                    
142 <div id="message" class="updated"><p><?php _e('File edited successfully.') ?></p></div>
                    
143<?php elseif (isset($_GET['phperror'])) : ?>
                    
144 <div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p>
                    
146		if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $file) ) { ?>
                    
147	<iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&amp;plugin=<?php echo esc_attr($file); ?>&amp;_wpnonce=<?php echo esc_attr($_GET['_error_nonce']); ?>"></iframe>
                    
148	<?php } ?>
                    
210?>
                    
211		<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&amp;plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li>
                    
212<?php endforeach; ?>
                    
223		<?php if ( !empty( $docs_select ) ) : ?>
                    
224		<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" /></div>
                    
225		<?php endif; ?>
                    
                
theme-editor.php https://gitlab.com/Blueprint-Marketing/WordPress-1 | PHP | 245 lines
                    
1<?php
                    
2/**
                    
9/** WordPress Administration Bootstrap */
                    
10require_once( dirname( __FILE__ ) . '/admin.php' );
                    
11
                    
171	<?php if ( $theme->parent() ) : ?>
                    
172	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
173	<?php endif; ?>
                    
188?>
                    
189		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
190<?php
                    
210		<?php echo $docs_select; ?>
                    
211		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
212		</div>
                    
216		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
217			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
218			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
run_js_tests.php https://gitlab.com/yousafsyed/easternglamor | PHP | 237 lines
                    
96    if (!in_array($file, $serveFiles)) {
                    
97        fwrite($fh, "  - " . $file . PHP_EOL);
                    
98    }
                    
100
                    
101fwrite($fh, "test:" . PHP_EOL);
                    
102foreach ($testFiles as $file) {
                    
102foreach ($testFiles as $file) {
                    
103    fwrite($fh, "  - " . $file . PHP_EOL);
                    
104}
                    
166
                    
167    fwrite($fh, $shellCommand . PHP_EOL);
                    
168    fclose($fh);
                    
178{
                    
179    reportError('Usage: php run_js_tests.php');
                    
180}
                    
                
File.php https://github.com/Nervie/Beta.git | PHP | 507 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP 5
                    
6 *
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://cakephp.org CakePHP(tm) Project
                    
15 * @package       Cake.Utility
                    
15 * @package       Cake.Utility
                    
16 * @since         CakePHP(tm) v 0.2.9
                    
17 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
222 * @param string $data Data to write to this File.
                    
223 * @param string $mode Mode of writing. {@link http://php.net/fwrite See fwrite()}.
                    
224 * @param string $force force the file to open
                    
                
plugin.gallery.upload.php https://github.com/4g3n7sm1th/cms.git | PHP | 377 lines
                    
1<?php
                    
2require_once('plugin.gallery.functions.php');
                    
47      case 3:
                    
48        if (PHP_VERSION >= '5.1.2') {
                    
49          // Convert to PNG quality.
                    
99      if ($temp) {
                    
100        @fwrite($temp, @file_get_contents($from_name)) or die("Cannot download image");
                    
101        @fclose($temp);
                    
202    function save($path) {    
                    
203        $input = fopen("php://input", "r");
                    
204        $temp = tmpfile();
                    
                
Process.php https://github.com/agustinc/SemdropsMobile.git | PHP | 372 lines
                    
1<?php
                    
2
                    
15 * Process is a thin wrapper around proc_* functions to ease
                    
16 * start independent PHP processes.
                    
17 *
                    
51        if (!function_exists('proc_open')) {
                    
52            throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
                    
53        }
                    
79     *
                    
80     * @param Closure|string|array $callback A PHP callback to run whenever there is some
                    
81     *                                       output available on STDOUT or STDERR
                    
106
                    
107        // Workaround for http://bugs.php.net/bug.php?id=51800
                    
108        if (strstr(PHP_OS, 'WIN')) {
                    
151            if ($w) {
                    
152                $written = fwrite($writePipes[0], (binary) substr($this->stdin, $stdinOffset), 8192);
                    
153                if (false !== $written) {
                    
                
php.php https://github.com/agallou/atoum.git | PHP | 245 lines
                    
63				->object($php->getAdapter())->isIdenticalTo($adapter)
                    
64				->object($php->setAdapter())->isIdenticalTo($php)
                    
65				->object($php->getAdapter())
                    
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
                    
97			->then
                    
98				->object($php->setBinaryPath())->isIdenticalTo($php)
                    
99				->string($php->getBinaryPath())->isEqualTo($phpBinary)
                    
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)
                    
124				->string($php->getBinaryPath())->isEqualTo($phpBinDir . '/php')
                    
125				->object($php->setBinaryPath($phpPath = uniqid()))->isIdenticalTo($php)
                    
126				->string($php->getBinaryPath())->isEqualTo($phpPath)
                    
                
file.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 333 lines
                    
1<?php
                    
2/**
                    
9 * @copyright  2010 - 2013 Fuel Development Team
                    
10 * @link       http://fuelphp.com
                    
11 */
                    
249		// write the session data
                    
250		fwrite($handle, $payload);
                    
251
                    
                
linux-vserver-action.php https://github.com/qyjohn/openqrm.git | PHP | 161 lines
                    
1<?php
                    
2$linux_vserver_command = $_REQUEST["linux_vserver_command"];
                    
8<title>openQRM Linux-VServer actions</title>
                    
9<meta http-equiv="refresh" content="0; URL=linux-vserver-manager.php?currenttab=tab0&strMsg=Processing <?php echo $linux_vserver_command; ?>">
                    
10</head>
                    
12
                    
13<?php
                    
14/*
                    
33$RootDir = $_SERVER["DOCUMENT_ROOT"].'/openqrm/base/';
                    
34require_once "$RootDir/include/openqrm-database-functions.php";
                    
35require_once "$RootDir/include/user.inc.php";
                    
35require_once "$RootDir/include/user.inc.php";
                    
36require_once "$RootDir/include/openqrm-server-config.php";
                    
37require_once "$RootDir/class/resource.class.php";
                    
37require_once "$RootDir/class/resource.class.php";
                    
38require_once "$RootDir/class/appliance.class.php";
                    
39require_once "$RootDir/class/kernel.class.php";
                    
                
DOMTraverserTest.php https://bitbucket.org/mkalkbrenner/querypath.git | PHP | 357 lines
                    
1<?php
                    
2/**
                    
7
                    
8require_once __DIR__ . '/../TestCase.php';
                    
9
                    
24  public function debug($msg) {
                    
25    fwrite(STDOUT, PHP_EOL . $msg);
                    
26  }
                    
                
fileio.cpp https://github.com/o1iver/Code-Backup.git | C++ | 620 lines
                    
53as_value fileio_gets(const fn_call& fn);
                    
54as_value fileio_fwrite(const fn_call& fn);
                    
55as_value fileio_fputc(const fn_call& fn);
                    
69// Maybe this should be moved to a dedicated extension and a different class? 
                    
70// The scandir() syntax comes from PHP, since the C syntax is not quite 
                    
71// applicable in ActionScript.
                    
90    
                    
91    int fwrite(const std::string &str);
                    
92    bool fputc(int c);
                    
119
                    
120    obj.init_member("fwrite", gl.createFunction(fileio_fwrite));
                    
121    obj.init_member("fputc", gl.createFunction(fileio_fputc));
                    
305int
                    
306FileIO::fwrite(const string &str)
                    
307{
                    
                
mo.php https://gitlab.com/morganestes/wordpress-develop | PHP | 339 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @version $Id: mo.php 1157 2015-11-20 04:30:11Z dd32 $
                    
6 * @package pomo
                    
9
                    
10require_once dirname( __FILE__ ) . '/translations.php';
                    
11require_once dirname( __FILE__ ) . '/streams.php';
                    
68		function export() {
                    
69			$tmp_fh = fopen( 'php://temp', 'r+' );
                    
70			if ( ! $tmp_fh ) {
                    
108			$current_addr              = $hash_addr;
                    
109			fwrite(
                    
110				$fh, pack(
                    
117			// headers' msgid is an empty string
                    
118			fwrite( $fh, pack( 'VV', 0, $current_addr ) );
                    
119			$current_addr++;
                    
                
BlueScreen.php https://gitlab.com/adam.kvita/MI-VMM-SIFT | PHP | 270 lines
                    
1<?php
                    
2
                    
60	{
                    
61		if (Helpers::isAjax() && session_status() === PHP_SESSION_ACTIVE) {
                    
62			ob_start(function () {});
                    
83		if ($handle = @fopen($file, 'x')) {
                    
84			ob_start(); // double buffer prevents sending HTTP headers in some PHP
                    
85			ob_start(function ($buffer) use ($handle) { fwrite($handle, $buffer); }, 4096);
                    
160		if ($source) {
                    
161			$source = static::highlightPhp($source, $line, $lines, $vars);
                    
162			if ($editor = Helpers::editorUri($file, $line)) {
                    
176	 */
                    
177	public static function highlightPhp($source, $line, $lines = 15, array $vars = NULL)
                    
178	{
                    
                
sendemail.php https://github.com/maddogfyg/eningjia.git | PHP | 346 lines
                    
62					$_MX[$domain]=$result;
                    
63					writeover(D_P.'data/bbscache/mx_config.php',"<?php\r\n\$_MX=".pw_var_export($_MX).";\r\n?>");
                    
64					$this->smtp['tomx']=$result;
                    
232		if($M_db->smtp['auth']){
                    
233			fwrite($fp,"EHLO phpwind\r\n");
                    
234			while($rt=strtolower(fgets($fp,512))){
                    
253		} else{
                    
254			fwrite($fp, "HELO phpwind\r\n");
                    
255		}
                    
261		}
                    
262		fwrite($fp, "RCPT TO: <$toemail>\r\n");
                    
263		if(strncmp(fgets($fp,512),'250',3)!=0){
                    
273		$msg .= "$send_message\r\n.\r\n";
                    
274		fwrite($fp, $msg);
                    
275		$lastmessage = fgets($fp, 512);
                    
                
CrossRefExportPlugin.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 302 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @file plugins/importexport/crossref/CrossRefExportPlugin.inc.php
                    
5 *
                    
14
                    
15// $Id: CrossRefExportPlugin.inc.php,v 1.23 2009/10/27 22:33:58 asmecher Exp $
                    
16
                    
165			if (($h = fopen($outputFile, 'w'))===false) return false;
                    
166			fwrite($h, XMLCustomWriter::getXML($doc));
                    
167			fclose($h);
                    
225			if (($h = fopen($outputFile, 'w'))===false) return false;
                    
226			fwrite($h, XMLCustomWriter::getXML($doc));
                    
227			fclose($h);
                    
                
CodeSwitch.class.php https://gitlab.com/llwhois/woaimm | PHP | 200 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
118			$fpw = fopen($filename,"w");
                    
119			fwrite($fpw,$content);
                    
120			fclose($fpw);
                    
137     */
                    
138	static function searchdir($path,$mode = "FULL",$file_types = array(".html",".php"),$maxdepth = -1,$d = 0) {
                    
139	   if(substr($path,strlen($path)-1) != '/')
                    
178	/**
                    
179     * 对整个项目目录中的PHP和HTML文件行进编码转换
                    
180     * @access public
                    
                
Cache.php https://github.com/grandison/budo16.git | PHP | 262 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
                    
8 *
                    
9 * PHP versions 4 and 5
                    
10 *
                    
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
                    
33
                    
34require_once "File/Archive/Reader.php";
                    
35
                    
62        while (($data = $this->source->getData($bufferSize))!=null) {
                    
63            fwrite($this->tmpFile, $data);
                    
64        }
                    
                
common.php https://gitlab.com/VxMxPx/mysli | PHP | 281 lines
                    
1<?php
                    
2
                    
58#   sys.cli.output     => \sys\cli\output
                    
59#   sys/cli/output.php => ^
                    
60function filetoclass(string $path): string
                    
61{
                    
62  if (substr($path, -4) === '.php') { $path = substr($path, 0, -4); }
                    
63  return '\\'.str_replace(['.', '/'], '\\', $path);
                    
68{
                    
69  return php_sapi_name() === 'cli' || defined('STDIN');
                    
70}
                    
84
                    
85# dump, but don't die - fwrite STDOUT results
                    
86function dump_s()
                    
91  fwrite(STDOUT, call_user_func_array('dump_r', func_get_args()));
                    
92  fwrite(STDOUT, PHP_EOL);
                    
93  flush();
                    
                
SafeStream.php https://github.com/simekadam/bzukotbook.git | PHP | 287 lines
                    
1<?php
                    
2
                    
202		$len = strlen($data);
                    
203		$res = fwrite($this->handle, $data, $len);
                    
204
                    
                
file.php https://github.com/ixpectus/core.git | PHP | 306 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * Fuel is a fast, lightweight, community driven PHP5 framework.
                    
6 *
                    
11 * @copyright  2010 - 2011 Fuel Development Team
                    
12 * @link       http://fuelphp.com
                    
13 */
                    
219			// write the session data
                    
220			fwrite($handle, $payload);
                    
221
                    
305
                    
306/* End of file file.php */
                    
307
                    
                
backuplib.php https://github.com/nicolasconnault/moodle2.0.git | PHP | 243 lines
                    
1<?PHP //$Id: backuplib.php,v 1.11 2009/04/20 20:14:15 skodak Exp $
                    
2    //This php script contains all the stuff to backup/restore
                    
52        //Start mod
                    
53        fwrite ($bf,start_tag("MOD",3,true));
                    
54        //Print assignment data
                    
54        //Print assignment data
                    
55        fwrite ($bf,full_tag("ID",4,false,$wiki->id));
                    
56        fwrite ($bf,full_tag("MODTYPE",4,false,"wiki"));
                    
56        fwrite ($bf,full_tag("MODTYPE",4,false,"wiki"));
                    
57        fwrite ($bf,full_tag("NAME",4,false,$wiki->name));
                    
58        fwrite ($bf,full_tag("SUMMARY",4,false,$wiki->intro));
                    
58        fwrite ($bf,full_tag("SUMMARY",4,false,$wiki->intro));
                    
59        fwrite ($bf,full_tag("PAGENAME",4,false,$wiki->pagename));
                    
60        fwrite ($bf,full_tag("WTYPE",4,false,$wiki->wtype));
                    
60        fwrite ($bf,full_tag("WTYPE",4,false,$wiki->wtype));
                    
61        fwrite ($bf,full_tag("EWIKIPRINTTITLE",4,false,$wiki->ewikiprinttitle));
                    
62        fwrite ($bf,full_tag("HTMLMODE",4,false,$wiki->htmlmode));
                    
                
Web.php https://github.com/philip/phd.git | PHP | 196 lines
                    
4
                    
5class Package_PHP_Web extends Package_PHP_XHTML {
                    
6    public function __construct() {
                    
7        parent::__construct();
                    
8        $this->registerFormatName("PHP-Web");
                    
9        $this->setTitle("PHP Manual");
                    
10        $this->setChunked(true);
                    
11        $this->setExt(Config::ext() === null ? ".php" : Config::ext());
                    
12    }
                    
30            $fp = $this->popFileStream();
                    
31            fwrite($fp, $data);
                    
32            $this->writeChunk($this->CURRENT_CHUNK, $fp);
                    
37            $fp = fopen("php://temp/maxmemory", "r+");
                    
38            fwrite($fp, $data);
                    
39            $this->pushFileStream($fp);
                    
                
file.php https://github.com/airhorns/Skylight-Labs.git | PHP | 237 lines
                    
1<?php
                    
2/**
                    
92		$result['valid'] = false;
                    
93		$result['reason'][$name] = $wpcf7_contact_form->message( 'upload_failed_php_error' );
                    
94		return $result;
                    
161	// If you get script file, it's a danger. Make it TXT file.
                    
162	if ( preg_match( '/\.(php|pl|py|rb|cgi)\d?$/', $filename ) )
                    
163		$filename .= '.txt';
                    
164
                    
165	// foo.php.jpg => foo.php_.jpg
                    
166	$filename = wpcf7_sanitize_file_name( $filename );
                    
198	if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
                    
199		fwrite( $handle, "Deny from all\n" );
                    
200		fclose( $handle );
                    
                
UploadFromUrl.php https://github.com/sowawa/mediawiki-svn.git | PHP | 243 lines
                    
1<?php
                    
2/**
                    
116	public function saveTempFileChunk( $req, $buffer ) {
                    
117		$nbytes = fwrite( $this->mTmpHandle, $buffer );
                    
118
                    
                
FileEngine.php https://gitlab.com/minotnepal/www.git | PHP | 486 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         1.2.0
                    
12 * @since         1.2.0
                    
13 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
14 */
                    
158        $success = $this->_File->ftruncate(0) &&
                    
159            $this->_File->fwrite($contents) &&
                    
160            $this->_File->fflush();
                    
                
class-zip.php https://gitlab.com/endomorphosis/falkenstein | PHP | 306 lines
                    
1<?php
                    
2
                    
92				foreach ($this->adddirs as $dir) {
                    
93					fwrite($pipes[0], $dir."/\n");
                    
94				}
                    
112					// Send the list of files on stdin
                    
113					fwrite($pipes[0], $file."\n");
                    
114					if (0 == count($files)) fclose($pipes[0]);
                    
217	public function open($path, $flags = 0) {
                    
218		if(!class_exists('PclZip')) include_once(ABSPATH.'/wp-admin/includes/class-pclzip.php');
                    
219		if(!class_exists('PclZip')) {
                    
                
recaptchalib.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 277 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * This is a PHP library that handles calling reCAPTCHA.
                    
4 *    - Documentation and latest version
                    
4 *    - Documentation and latest version
                    
5 *          http://recaptcha.net/plugins/php/
                    
6 *    - Get a reCAPTCHA API Key
                    
74        $http_request .= "Content-Length: " . strlen($req) . "\r\n";
                    
75        $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
                    
76        $http_request .= "\r\n";
                    
83
                    
84        fwrite($fs, $http_request);
                    
85
                    
215	if (! function_exists ("mcrypt_encrypt")) {
                    
216		die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
                    
217	}
                    
                
Csv.php https://github.com/corneliusweiss/Tine-2.0-Open-Source-Groupware-and-CRM.git | PHP | 294 lines
                    
1<?php
                    
2/**
                    
103    /**
                    
104     * The php build in fputcsv function is buggy, so we need an own one :-(
                    
105     *
                    
125        
                    
126        fwrite($filePointer, $string);
                    
127    }
                    
                
File.php https://github.com/Zefiryn/graduationprojects.git | PHP | 442 lines
                    
1<?php
                    
2
                    
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 */
                    
26 */
                    
27require_once "Zend/OpenId/Provider/Storage.php";
                    
28
                    
118			$data = serialize(array($handle, $macFunc, $secret, $expires));
                    
119			fwrite($f, $data);
                    
120			fclose($f);
                    
232			$data = serialize(array($id, $password, array()));
                    
233			fwrite($f, $data);
                    
234			fclose($f);
                    
429					$data = serialize(array($id, $storedPassword, $sites));
                    
430					fwrite($f, $data);
                    
431					$ret = true;
                    
                
MainLogger.php https://gitlab.com/wesleyvanneck/ImagicalMine | PHP | 402 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * src/pocketmine/utils/MainLogger.php
                    
4 *
                    
315        if (!Terminal::hasFormattingCodes()) {
                    
316            echo $cleanMessage . PHP_EOL;
                    
317        } else {
                    
317        } else {
                    
318            echo $message . PHP_EOL;
                    
319        }
                    
356                        $chunk = $this->logStream->shift();
                    
357                        fwrite($this->logResource, $chunk);
                    
358                    }
                    
366                    $chunk = $this->logStream->shift();
                    
367                    fwrite($this->logResource, $chunk);
                    
368                }
                    
                
pwp.c https://bitbucket.org/wallwizz/imagemagick-6.8.4-for-bb10.git | C | 319 lines
                    
25%                                                                             %
                    
26%    http://www.imagemagick.org/script/license.php                            %
                    
27%                                                                             %
                    
207      }
                    
208    length=fwrite("SFW94A",1,6,file);
                    
209    (void) length;
                    
                
backuplib.php https://github.com/nadavkav/MoodleTAO.git | PHP | 273 lines
                    
1<?php //$Id: version.php,v 3.1.9.3
                    
2    //This php script contains all the stuff to backup/restore
                    
34        //Start mod
                    
35        fwrite ($bf,start_tag("MOD",3,true));
                    
36        //Print certificate data
                    
36        //Print certificate data
                    
37        fwrite ($bf,full_tag("ID",4,false,$certificate->id));
                    
38        fwrite ($bf,full_tag("MODTYPE",4,false,"certificate"));
                    
38        fwrite ($bf,full_tag("MODTYPE",4,false,"certificate"));
                    
39        fwrite ($bf,full_tag("NAME",4,false,$certificate->name));
                    
40        fwrite ($bf,full_tag("INTRO",4,false,$certificate->intro));
                    
40        fwrite ($bf,full_tag("INTRO",4,false,$certificate->intro));
                    
41        fwrite ($bf,full_tag("EMAILTEACHERS",4,false,$certificate->emailteachers));
                    
42        fwrite ($bf,full_tag("EMAILOTHERS",4,false,$certificate->emailothers));
                    
42        fwrite ($bf,full_tag("EMAILOTHERS",4,false,$certificate->emailothers));
                    
43        fwrite ($bf,full_tag("SAVECERT",4,false,$certificate->savecert));
                    
44        fwrite ($bf,full_tag("REPORTCERT",4,false,$certificate->reportcert));
                    
                
Socket.php https://github.com/bhaumik25/zend-framework.git | PHP | 285 lines
                    
1<?php
                    
2
                    
23
                    
24require_once 'Zend/Uri/Http.php';
                    
25require_once 'Zend/Http/Client/Adapter/Interface.php';
                    
25require_once 'Zend/Http/Client/Adapter/Interface.php';
                    
26require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
27
                    
29 * A sockets based (fsockopen) adapter class for Zend_Http_Client. Can be used
                    
30 * on almost every PHP environment, and does not require any special extensions.
                    
31 *
                    
167        // Send the request
                    
168        if (! @fwrite($this->socket, $request)) {
                    
169            throw new Zend_Http_Client_Adapter_Exception('Error writing request to server');
                    
                
FileEngine.php https://bitbucket.org/ManiAdil/jardinorient.git | PHP | 373 lines
                    
1<?php
                    
2/**
                    
8 *
                    
9 * PHP 5
                    
10 *
                    
10 *
                    
11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
12 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
18 * @link          http://cakephp.org CakePHP(tm) Project
                    
19 * @since         CakePHP(tm) v 1.2.0.4933
                    
19 * @since         CakePHP(tm) v 1.2.0.4933
                    
20 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
21 */
                    
142		$this->_File->rewind();
                    
143		$success = $this->_File->ftruncate(0) && $this->_File->fwrite($contents) && $this->_File->fflush();
                    
144
                    
                
GLAccountCSV.php http://chronique.googlecode.com/svn/ | PHP | 265 lines
                    
1<?php
                    
2
                    
3
                    
4/* $Id: GLAccountCSV.php 4492 2011-02-18 09:56:52Z daintree $ */
                    
5
                    
20
                    
21echo '<form method="POST" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">';
                    
22echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
                    
170
                    
171		fwrite($fp, $SelectedAccount . ' - ' . $AccountName . ' ' . _('for period'). ' ' . $FirstPeriodSelected . ' ' . _('to') . ' ' . $LastPeriodSelected . "\n");
                    
172		if ($PandLAccount==True) {
                    
187			if ($RunningTotal < 0 ){
                    
188				fwrite($fp,$SelectedAccount . ', '  .$FirstPeriodSelected . ', ' . _('Brought Forward Balance') . ',,,,' . -$RunningTotal . "\n");
                    
189			} else {
                    
189			} else {
                    
190				fwrite($fp,$SelectedAccount . ', '  .$FirstPeriodSelected . ', ' . _('Brought Forward Balance') . ',,,' . $RunningTotal . "\n");
                    
191			}
                    
                
class-terminus.php https://gitlab.com/Blueprint-Marketing/cli | PHP | 417 lines
                    
27    if(!$configurator) {
                    
28      $configurator = new Terminus\Configurator(TERMINUS_ROOT . '/php/config-spec.php');
                    
29    }
                    
209      $question = vsprintf($question, $params);
                    
210      fwrite(STDOUT, $question . " [y/n] ");
                    
211
                    
337
                    
338    $php_bin = self::get_php_binary();
                    
339
                    
340    if(Terminus::is_test()) {
                    
341      $script_path = __DIR__.'/boot-fs.php';
                    
342    } else {
                    
353
                    
354  private static function get_php_binary() {
                    
355    if(defined('PHP_BINARY'))
                    
                
ZipArchive.php https://gitlab.com/team_fsn/fsn-php | PHP | 175 lines
                    
20 *
                    
21 * @category   PHPExcel
                    
22 * @package    PHPExcel_Shared_ZipArchive
                    
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
                    
30}
                    
31require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php';
                    
32
                    
34/**
                    
35 * PHPExcel_Shared_ZipArchive
                    
36 *
                    
38 * @package    PHPExcel_Shared_ZipArchive
                    
39 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
40 */
                    
                
TSocket.php https://github.com/lenn0x/Milo-Tracing-Framework.git | PHP | 313 lines
                    
1<?php
                    
2/*
                    
31  /**
                    
32   * Handle to PHP socket
                    
33   *
                    
285    while (mb_strlen($buf,'8bit') > 0) {
                    
286      $got = @fwrite($this->handle_, $buf);
                    
287      if ($got === 0 || $got === FALSE) {
                    
                
LoggerClient.h https://github.com/akosmasoftware/Notitas.git | C Header | 231 lines
                    
8 *
                    
9 * BSD license follows (http://www.opensource.org/licenses/bsd-license.php)
                    
10 * 
                    
96
                    
97	CFWriteStreamRef logStream;						// The connected stream we're writing to
                    
98	CFWriteStreamRef bufferWriteStream;				// If bufferFile not NULL and we're not connected, points to a stream for writing log data
                    
                
Xml.php https://github.com/grandison/budo16.git | PHP | 160 lines
                    
45
                    
46require_once 'PHPUnit/Framework.php';
                    
47require_once 'PHPUnit/Util/Filter.php';
                    
48
                    
49require_once 'PHPUnit/Extensions/Database/DataSet/Persistors/Abstract.php';
                    
50
                    
50
                    
51PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
52
                    
64 */
                    
65class PHPUnit_Extensions_Database_DataSet_Persistors_Xml extends PHPUnit_Extensions_Database_DataSet_Persistors_Abstract
                    
66{
                    
99
                    
100        fwrite($this->fh, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
                    
101        fwrite($this->fh, "<dataset>\n");
                    
                
FileValidatorTest.php https://github.com/Exercise/symfony.git | PHP | 324 lines
                    
1<?php
                    
2
                    
18
                    
19abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase
                    
20{
                    
91    {
                    
92        fwrite($this->file, str_repeat('0', 11));
                    
93
                    
111    {
                    
112        fwrite($this->file, str_repeat('0', 1400));
                    
113
                    
131    {
                    
132        fwrite($this->file, str_repeat('0', 1400000));
                    
133
                    
                
qdpm_upload_exec.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 272 lines
                    
45        [
                    
46          [ 'Generic (PHP Payload)', { 'Arch' => ARCH_PHP, 'Platform' => 'php' }  ],
                    
47          [ 'Linux x86'            , { 'Arch' => ARCH_X86, 'Platform' => 'linux'} ]
                    
85    |
                    
86    php = php.gsub(/^\t\t/, '').gsub(/\n/, ' ')
                    
87    return php
                    
177    data.add_part(username, nil, nil, 'form-data; name="users[name]"')
                    
178    data.add_part(php_payload, nil, nil, "form-data; name=\"users[photo]\"; filename=\"#{fname}\"")
                    
179    data.add_part('', nil, nil, 'form-data; name="preview_photo"')
                    
193        'Origin' => "http://#{rhost}",
                    
194        'Referer' => "http://#{rhost}#{base}/index.php/home/myAccount"
                    
195      }
                    
242
                    
243    php_fname = "#{Rex::Text.rand_text_alpha(5)}.php"
                    
244    @clean_files = [php_fname]
                    
                
Proxy.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 339 lines
                    
1<?php
                    
2
                    
18 * @subpackage Client_Adapter
                    
19 * @version    $Id: Proxy.php 25261 2013-02-14 12:31:01Z frosch $
                    
20 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
26 */
                    
27require_once 'Zend/Uri/Http.php';
                    
28/**
                    
30 */
                    
31require_once 'Zend/Http/Client.php';
                    
32/**
                    
34 */
                    
35require_once 'Zend/Http/Client/Adapter/Socket.php';
                    
36
                    
135        if (!$this->socket) {
                    
136            require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
137            throw new Zend_Http_Client_Adapter_Exception(
                    
                
file.php https://github.com/cj/obullo.git | PHP | 450 lines
                    
1<?php
                    
2defined('BASE') or exit('Access Denied!');
                    
6 *
                    
7 * PHP5 MVC Based Minimalist Software.
                    
8 * 
                    
89	    flock($fp, LOCK_EX);
                    
90	    fwrite($fp, $data);
                    
91	    flock($fp, LOCK_UN);
                    
233
                    
234            // foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
235            while (FALSE !== ($file = readdir($fp)))
                    
261*
                    
262* Translates a file extension into a mime type based on config/mimes.php. 
                    
263* Returns FALSE if it can't determine the type, or open the mime config file
                    
448
                    
449/* End of file file.php */
                    
450/* Location: ./base/helpers/file.php */
                    
                
Command.php https://github.com/KaRLsM/SIFO.git | PHP | 157 lines
                    
48
                    
49require_once 'PHP/PMD.php';
                    
50require_once 'PHP/PMD/TextUI/CommandLineOptions.php';
                    
61 * @version    Release: 1.1.1
                    
62 * @link       http://phpmd.org
                    
63 */
                    
89        if ($opts->hasVersion()) {
                    
90            fwrite(STDOUT, 'PHPMD 1.1.1 by Manuel Pichler' . PHP_EOL);
                    
91            return self::EXIT_SUCCESS;
                    
108
                    
109        $phpmd = new PHP_PMD();
                    
110
                    
150            fwrite(STDERR, $e->getMessage());
                    
151            fwrite(STDERR, PHP_EOL);
                    
152            
                    
                
xs_clone.php https://github.com/igorw-forks/icy_phoenix.git | PHP | 348 lines
                    
19if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './../');
                    
20if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
                    
21$no_page_header = true;
                    
21$no_page_header = true;
                    
22require('pagestart.' . PHP_EXT);
                    
23
                    
24define('IN_XS', true);
                    
25include_once('xs_include.' . PHP_EXT);
                    
26
                    
28
                    
29$lang['xs_clone_back'] = str_replace('{URL}', append_sid('xs_clone.' . PHP_EXT), $lang['xs_clone_back']);
                    
30
                    
147	}
                    
148	xs_ftp_connect(append_sid('xs_clone.' . PHP_EXT), $request, true);
                    
149	if($ftp === XS_FTP_LOCAL)
                    
                
backuplib.php https://github.com/galitush2005/RTL-BIDI-Hebrew-Moodle-Plugins.git | PHP | 275 lines
                    
1<?php //$Id: backuplib.php,v 1.3 2008/10/11 19:12:35 bdaloukas Exp $
                    
2    //This php script contains all the stuff to backup games
                    
91        //Start mod
                    
92        fwrite ($bf,start_tag("MOD",3,true));
                    
93		
                    
116        //End mod
                    
117        $status = fwrite ($bf,end_tag("MOD",3,true));
                    
118        
                    
128            //Write start tag
                    
129            $status = fwrite ($bf,start_tag( $tags, $levels, true));
                    
130            //Iterate over each attempt
                    
132                //Start game_snakes_database
                    
133                $status = fwrite ($bf, start_tag( $tag, $level, true));
                    
134                    game_backup_record( $bf, $rec, $level);
                    
134                    game_backup_record( $bf, $rec, $level);
                    
135                $status = fwrite ($bf, end_tag( $tag, $level, true));
                    
136            }
                    
                
dump.php http://creative-portal.googlecode.com/svn/trunk/ | PHP | 348 lines
                    
1<?php
                    
2
                    
78        {
                    
79            return @call_user_func_array( ( $this->savetype == 'gz' ) ? "gzwrite" : "fwrite", array( 
                    
80                $this->fp, $content 
                    
169    $patterns = array( 
                    
170        "/\{\|SERVER_NAME\|\}/", "/\{\|GENERATION_TIME\|\}/", "/\{\|SQL_VERSION\|\}/", "/\{\|PHP_VERSION\|\}/", "/\{\|DB_NAME\|\}/" 
                    
171    );
                    
172    $replacements = array( 
                    
173        $db->server, gmdate( "F j, Y, h:i A", NV_CURRENTTIME ) . " GMT", $db->sql_version, PHP_VERSION, $db->dbname 
                    
174    );
                    
                
Ftp.php https://gitlab.com/puntodos/ean-landings | PHP | 448 lines
                    
1<?php
                    
2
                    
186    {
                    
187        $stream = fopen('php://temp', 'w+b');
                    
188        fwrite($stream, $contents);
                    
397    {
                    
398        $stream = fopen('php://temp', 'w+');
                    
399        $result = ftp_fget($this->getConnection(), $stream, $path, $this->transferMode);
                    
                
test_ext_mailparse.cpp https://github.com/zsj888/hiphop-php.git | C++ | 412 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
6   +----------------------------------------------------------------------+
                    
7   | This source file is subject to version 3.01 of the PHP license,      |
                    
8   | that is bundled with this package in the file LICENSE, and is        |
                    
9   | available through the world-wide-web at the following url:           |
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
49bool TestExtMailparse::test_mail() {
                    
50  //VCB("<?php ");
                    
51  return Count(true);
                    
                
wp_loaded.php https://gitlab.com/najomie/fit-hippie | PHP | 281 lines
                    
1<?php
                    
2
                    
215									$log = @fopen($log_file, 'a+');				
                    
216									@fwrite($log, $log_data);
                    
217									@fclose($log);
                    
                
function.eio-grp.html https://bitbucket.org/thncr/manuals.git | HTML | 145 lines
                    
11 <div class="up"><a href="ref.eio.html">Eio 函数</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="function.eio-grp" class="refentry">
                    
45<em><code class="parameter">callback</code></em>
                    
46函数在请求完成时被调用。其应匹配一下原型:<div class="example-contents"><div class="phpcode"><code><span style="color: #000000">
                    
47void&nbsp;callback(mixed&nbsp;$data,&nbsp;int&nbsp;$result[,&nbsp;resource&nbsp;$req]);</span>
                    
115<div class="phpcode"><code><span style="color: #000000">
                    
116<span style="color: #0000BB">&lt;?php<br />$temp_filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">)&nbsp;.</span><span style="color: #DD0000">"/eio-file.tmp"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"some&nbsp;data"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$my_file_fd&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">NULL</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/*&nbsp;Is&nbsp;called&nbsp;when&nbsp;the&nbsp;group&nbsp;requests&nbsp;are&nbsp;done&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_grp_done</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">)&nbsp;{<br />&nbsp;</span><span style="color: #FF8000">//&nbsp;Remove&nbsp;the&nbsp;file,&nbsp;if&nbsp;it&nbsp;still&nbsp;exists<br />&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #FF8000">/*&nbsp;Is&nbsp;called&nbsp;when&nbsp;the&nbsp;temporary&nbsp;file&nbsp;is&nbsp;opened&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_grp_file_opened_callback</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">)&nbsp;{<br />&nbsp;global&nbsp;</span><span style="color: #0000BB">$my_file_fd</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$grp</span><span style="color: #007700">;<br /><br />&nbsp;</span><span style="color: #0000BB">$my_file_fd&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">;<br /><br />&nbsp;</span><span style="color: #0000BB">$req&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">eio_read</span><span style="color: #007700">(</span><span style="color: #0000BB">$my_file_fd</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">EIO_PRI_DEFAULT</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"my_grp_file_read_callback"</span><span style="color: #007700">);<br />&nbsp;</span><span style="color: #0000BB">eio_grp_add</span><span style="color: #007700">(</span><span style="color: #0000BB">$grp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #FF8000">/*&nbsp;Is&nbsp;called&nbsp;when&nbsp;the&nbsp;file&nbsp;is&nbsp;read&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_grp_file_read_callback</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$result</span><span style="color: #007700">)&nbsp;{<br />&nbsp;global&nbsp;</span><span style="color: #0000BB">$my_file_fd</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$grp</span><span style="color: #007700">;<br /><br />&nbsp;</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">);<br /><br />&nbsp;</span><span style="color: #FF8000">//&nbsp;Create&nbsp;request&nbsp;to&nbsp;close&nbsp;the&nbsp;file<br />&nbsp;</span><span style="color: #0000BB">$req&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">eio_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$my_file_fd</span><span style="color: #007700">);<br /><br />&nbsp;</span><span style="color: #FF8000">//&nbsp;Add&nbsp;request&nbsp;to&nbsp;the&nbsp;group<br />&nbsp;</span><span style="color: #0000BB">eio_grp_add</span><span style="color: #007700">(</span><span style="color: #0000BB">$grp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;Create&nbsp;request&nbsp;group<br /></span><span style="color: #0000BB">$grp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">eio_grp</span><span style="color: #007700">(</span><span style="color: #DD0000">"my_grp_done"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Create&nbsp;request<br /></span><span style="color: #0000BB">$req&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">eio_open</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">EIO_O_RDWR&nbsp;</span><span style="color: #007700">|&nbsp;</span><span style="color: #0000BB">EIO_O_APPEND&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">EIO_PRI_DEFAULT</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"my_grp_file_opened_callback"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Add&nbsp;request&nbsp;to&nbsp;the&nbsp;group<br /></span><span style="color: #0000BB">eio_grp_add</span><span style="color: #007700">(</span><span style="color: #0000BB">$grp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Process&nbsp;requests<br /></span><span style="color: #0000BB">eio_event_loop</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
                    
117</span>
                    
143 <div class="up"><a href="ref.eio.html">Eio 函数</a></div>
                    
144 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
145</div></body></html>
                    
                
class.utils.php https://gitlab.com/sokeara/Tribal_Education | PHP | 351 lines
                    
1<?php
                    
2// Exit if accessed directly
                    
95    /** 
                    
96     *  PHP_SAPI for fcgi requires a data flush of at least 256
                    
97     *  bytes every 40 seconds or else it forces a script hault
                    
114            $buffer = fread($sp, 512);  // use a buffer of 512 bytes
                    
115            fwrite($op, $buffer);
                    
116        }
                    
327		//FALL BACK: Windows XP has bug with glob, 
                    
328		//add secondary check for PHP lameness
                    
329		if ($dh = opendir('.')) 
                    
                
recaptchalib.php https://bitbucket.org/Mainboarder/s2firewall.git | PHP | 277 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * This is a PHP library that handles calling reCAPTCHA.
                    
4 *    - Documentation and latest version
                    
4 *    - Documentation and latest version
                    
5 *          http://recaptcha.net/plugins/php/
                    
6 *    - Get a reCAPTCHA API Key
                    
74        $http_request .= "Content-Length: " . strlen($req) . "\r\n";
                    
75        $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
                    
76        $http_request .= "\r\n";
                    
83
                    
84        fwrite($fs, $http_request);
                    
85
                    
215	if (! function_exists ("mcrypt_encrypt")) {
                    
216		die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
                    
217	}
                    
                
String.php https://github.com/almonk/Deadweight-CMS-1.git | PHP | 497 lines
                    
1<?php
                    
2
                    
298
                    
299		fwrite($file, $output);
                    
300		fclose($file);
                    
355					if (class_exists('Dwoo_Compiler', false) === false) {
                    
356						include DWOO_DIRECTORY . 'Dwoo/Compiler.php';
                    
357					}
                    
424		}
                    
425		return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php';
                    
426	}
                    
454	/**
                    
455	 * returns some php code that will check if this template has been modified or not
                    
456	 *
                    
487		// enforce the correct mode for all directories created
                    
488		if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) {
                    
489			$path = strtr(str_replace($baseDir, '', $path), '\\', '/');
                    
                
run.php https://gitlab.com/ezeql/fups | PHP | 222 lines
                    
42		$num_php_processes = $output[0];
                    
43		if ($num_php_processes > FUPS_MAX_PHP_PROCESSES) {
                    
44			$err = 'Apologies, my web hosting account is currently running short of allowable tasks; please wait a little and then try again. Feel free to <a href="'.FUPS_CONTACT_URL.'">contact me</a> if this situation persists over an extended period. Thank you!';
                    
67					$value = $_POST[$setting];
                    
68					fwrite($fp, $setting.'='.$value.PHP_EOL);
                    
69				}
                    
87				if (!try_run_bg_proc($cmd)) {
                    
88					$err = 'Apologies, the server encountered a technical error: it was unable to initiate the background process to perform the task of scraping, sorting and finally presenting your posts. The command used was:<br />'.PHP_EOL.'<br />'.PHP_EOL.$cmd.'<br />'.PHP_EOL.'<br />'.PHP_EOL.'You might like to try again or <a href="'.FUPS_CONTACT_URL.'">contact me</a> about this error.';
                    
89				}
                    
126			<ul class="fups_listmin">
                    
127				<li><a href="<?php echo $fups_url_homepage; ?>">&lt;&lt; Back to the FUPS homepage</a></li>
                    
128			</ul>
                    
206					try {
                    
207						var base_url = '<?php echo $fups_url_ajax_get_status; ?>?token=<?php echo $token; ?>';
                    
208
                    
                
CoreTest.php https://gitlab.com/x33n/respond | PHP | 336 lines
                    
1<?php
                    
2namespace GuzzleHttp\Tests\Ring;
                    
9
                    
10class CoreTest extends \PHPUnit_Framework_TestCase
                    
11{
                    
171    {
                    
172        $r = fopen('php://memory', 'w+');
                    
173        fwrite($r, 'foo');
                    
                
functions.php https://bitbucket.org/zachisit/zachis.it-m.git | PHP | 367 lines
                    
135		"fwrite_dbuser" 			=> $duplicator_opts['dbuser'],
                    
136		"fwrite_wp_tableprefix" 	=> $wpdb->prefix,
                    
137		"fwrite_site_title"			=> get_option('blogname'),
                    
300	$ssfile = @fopen($path_ssdir .'/index.php', 'w');
                    
301	@fwrite($ssfile, '<?php error_reporting(0);  if (stristr(php_sapi_name(), "fcgi")) { $url  =  "http://" . $_SERVER["HTTP_HOST"]; header("Location: {$url}/404.html");} else { header("HTML/1.1 404 Not Found", true, 404);} exit(); ?>');
                    
302	@fclose($ssfile);
                    
305	$tokenfile = @fopen($path_ssdir .'/dtoken.php', 'w');
                    
306	@fwrite($tokenfile, '<?php error_reporting(0);  if (stristr(php_sapi_name(), "fcgi")) { $url  =  "http://" . $_SERVER["HTTP_HOST"]; header("Location: {$url}/404.html");} else { header("HTML/1.1 404 Not Found", true, 404);} exit(); ?>');
                    
307	@fclose($tokenfile);
                    
320	$tokenfile2 = @fopen($path_plugin .'files/dtoken.php', 'w');
                    
321	@fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTML/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>');
                    
322	@fclose($tokenfile2);
                    
363	$stamp = date('h:i:s');
                    
364	@fwrite($GLOBALS['duplicator_package_log_handle'], "{$stamp} {$msg} \n");
                    
365}
                    
                
ARC2_Reader.php https://code.google.com/p/goodrelations-for-joomla/ | PHP | 290 lines
                    
1<?php
                    
2/*
                    
175    /* request */
                    
176    fwrite($s, $h_code);
                    
177    /* timeout */
                    
                
 

Source

Language