PageRenderTime 287ms queryTime 78ms sortTime 22ms getByIdsTime 61ms findMatchingLines 59ms

100+ results results for 'php file_get_contents repo:lux/sitellite' (287 ms)

Not the results you expected?
flock.php https://github.com/denisbz/SPIP.git | PHP | 411 lines
                    
60	if (substr($fichier, -3) != '.gz') {
                    
61		if (function_exists('file_get_contents')
                    
62		AND ( 
                    
77// options = array(
                    
78// 'phpcheck' => 'oui' # verifier qu'on a bien du php
                    
79// dezippe automatiquement les fichiers .gz
                    
108		$ok = true;
                    
109		if ($options['phpcheck'] == 'oui')
                    
110			$ok &= (preg_match(",[?]>\n?$,", $contenu));
                    
193/**
                    
194 * Ecrire un contenu dans un fichier encapsule en php pour en empecher l'acces en l'absence
                    
195 * de htaccess
                    
328		@include("$path/dir_test.php");
                    
329		spip_unlink("$path/dir_test.php");
                    
330	}
                    
                
shell.test.php https://github.com/bloomtec/cake_base.git | PHP | 501 lines
                    
8 *
                    
9 * CakePHP :  Rapid Development Framework (http://cakephp.org)
                    
10 * Copyright 2005-2011, Cake Software Foundation, Inc.
                    
15 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc.
                    
16 * @link          http://cakephp.org CakePHP Project
                    
17 * @package       cake
                    
18 * @subpackage    cake.tests.cases.console.libs
                    
19 * @since         CakePHP v 1.2.0.7726
                    
20 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
419		$this->assertTrue(file_exists($file));
                    
420		$this->assertEqual(file_get_contents($file), $contents);
                    
421
                    
483
                    
484		$contents = "<?php\necho 'yet another test';\r\n\$te = 'st';\r\n?>";
                    
485		$result = $this->Shell->createFile($file, $contents);
                    
                
ReaderTest.php https://github.com/MontmereLimited/zf2.git | PHP | 376 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class ReaderTest extends \PHPUnit_Framework_TestCase
                    
38{
                    
54        $feed = Reader\Reader::importString(
                    
55            file_get_contents($this->_feedSamplePath.'/Reader/rss20.xml'));
                    
56        $type = Reader\Reader::detectType($feed);
                    
62        $feed = Reader\Reader::importString(
                    
63            file_get_contents($this->_feedSamplePath.'/Reader/rss094.xml'));
                    
64        $type = Reader\Reader::detectType($feed);
                    
70        $feed = Reader\Reader::importString(
                    
71            file_get_contents($this->_feedSamplePath.'/Reader/rss093.xml'));
                    
72        $type = Reader\Reader::detectType($feed);
                    
78        $feed = Reader\Reader::importString(
                    
79            file_get_contents($this->_feedSamplePath.'/Reader/rss092.xml'));
                    
80        $type = Reader\Reader::detectType($feed);
                    
                
UserProfileEntryTest.php https://github.com/Exercise/zf2.git | PHP | 262 lines
                    
1<?php
                    
2/**
                    
43 */
                    
44class UserProfileEntryTest extends \PHPUnit_Framework_TestCase
                    
45{
                    
47    public function setUp() {
                    
48        $this->entryText = file_get_contents(
                    
49                'Zend/GData/YouTube/_files/UserProfileEntryDataSample1.xml',
                    
50                true);
                    
51        $this->V2entryText = file_get_contents(
                    
52                'Zend/GData/YouTube/_files/UserProfileEntryDataSampleV2.xml',
                    
                
FileRepository_Backend_FileSystem.class.php https://github.com/cj/Project-Pier.git | PHP | 443 lines
                    
1<?php
                    
2
                    
75      
                    
76      return file_get_contents($file_path);
                    
77    } // getFileContent
                    
393      } // if
                    
394      return file_put_contents($file, "<?php\n\nreturn " . var_export($this->attributes, true) . ";\n\n?>");
                    
395    } // saveFileAttributes
                    
403    protected function getAttributesFilePath() {
                    
404      return with_slash($this->getRepositoryDir()) . 'attributes.php';
                    
405    } // getAttributesFilePath
                    
                
CallbackAbstract.php https://github.com/quarkness/piwik.git | PHP | 308 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: CallbackAbstract.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
25 */
                    
26// require_once 'Zend/Feed/Pubsubhubbub/CallbackInterface.php';
                    
27
                    
30 */
                    
31// require_once 'Zend/Feed/Pubsubhubbub/HttpResponse.php';
                    
32
                    
92        } elseif (!is_array($config)) {
                    
93            // require_once 'Zend/Feed/Pubsubhubbub/Exception.php';
                    
94            throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object'
                    
298    {
                    
299        $body = file_get_contents('php://input');
                    
300        if (strlen(trim($body)) == 0 && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
                    
                
Yaml.php https://gitlab.com/devtoannh/cafe | PHP | 381 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version   $Id: Yaml.php 24092 2011-05-31 02:43:28Z adamlundrigan $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Config.php';
                    
26
                    
101        if (!is_callable($yamlDecoder)) {
                    
102            require_once 'Zend/Config/Exception.php';
                    
103            throw new Zend_Config_Exception('Invalid parameter to setYamlDecoder() - must be callable');
                    
133        if (empty($yaml)) {
                    
134            require_once 'Zend/Config/Exception.php';
                    
135            throw new Zend_Config_Exception('Filename is not set');
                    
168        set_error_handler(array($this, '_loadFileErrorHandler'));
                    
169        $yaml = file_get_contents($yaml);
                    
170        restore_error_handler();
                    
                
vfsStream.php https://gitlab.com/supriyanto-edodoe22/manpro | PHP | 389 lines
                    
1<?php
                    
2/**
                    
114     * <code>
                    
115     * array('Core' = array('AbstractFactory' => array('test.php'    => 'some text content',
                    
116     *                                                 'other.php'   => 'Some more text content',
                    
119     *                      'AnEmptyFolder'   => array(),
                    
120     *                      'badlocation.php' => 'some bad content',
                    
121     *                )
                    
127     * \- Core
                    
128     *  |- badlocation.php
                    
129     *  |- AbstractFactory
                    
129     *  |- AbstractFactory
                    
130     *  | |- test.php
                    
131     *  | |- other.php
                    
157     * <code>
                    
158     * array('Core' = array('AbstractFactory' => array('test.php'    => 'some text content',
                    
159     *                                                 'other.php'   => 'Some more text content',
                    
                
ResponseTest.php https://github.com/rettal/zf2.git | PHP | 352 lines
                    
1<?php
                    
2/**
                    
37/**
                    
38 * PHPUnit test case
                    
39 */
                    
51 */
                    
52class ResponseTest extends \PHPUnit_Framework_TestCase
                    
53{
                    
58    {
                    
59        $response_text = file_get_contents(__DIR__ . '/_files/response_gzip');
                    
60
                    
69    {
                    
70        $response_text = file_get_contents(__DIR__ . '/_files/response_deflate');
                    
71
                    
89    {
                    
90        $response_text = file_get_contents(__DIR__ . '/_files/response_deflate_iis');
                    
91
                    
                
Local.php https://gitlab.com/madwanz64/laravel | PHP | 533 lines
                    
1<?php
                    
2
                    
222        $location = $this->applyPathPrefix($path);
                    
223        $contents = @file_get_contents($location);
                    
224
                    
                
Message.php https://github.com/advocaite/Travianx.git | PHP | 393 lines
                    
1<?php
                    
2
                    
45                        $this->sendMessage($post['an'],$post['be'],$post['message']);
                    
46                        }header("Location: nachrichten.php?t=2");
                    
47        					break;
                    
81						if(!$session->plus){
                    
82							header("Location: berichte.php");
                    
83						} else {
                    
110        				$this->reply = $_SESSION['reply'] = $message;
                    
111        				header("Location: nachrichten.php?t=1&id=" . $message['owner']);
                    
112        			}
                    
187        		}
                    
188        		header("Location: nachrichten.php");
                    
189        	}
                    
197        		}
                    
198        		header("Location: nachrichten.php");
                    
199        	}
                    
                
shell.test.php https://github.com/bb-dev/cakephp2x.git | PHP | 501 lines
                    
8 *
                    
9 * CakePHP : Rapid Development Framework (http://cakephp.org)
                    
10 * Copyright 2006-2009, Cake Software Foundation, Inc.
                    
15 * @copyright     Copyright 2006-2009, Cake Software Foundation, Inc.
                    
16 * @link          http://cakephp.org CakePHP Project
                    
17 * @package       cake
                    
18 * @subpackage    cake.tests.cases.console.libs
                    
19 * @since         CakePHP v 1.2.0.7726
                    
20 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
418		$this->assertTrue(file_exists($file));
                    
419		$this->assertEqual(file_get_contents($file), $contents);
                    
420
                    
482
                    
483		$contents = "<?php\necho 'yet another test';\r\n\$te = 'st';\r\n?>";
                    
484		$result = $this->Shell->createFile($file, $contents);
                    
                
UncaughtExceptionTest.php https://gitlab.com/reasonat/test8 | PHP | 280 lines
                    
36    chmod($settings_filename, 0777);
                    
37    $settings_php = file_get_contents($settings_filename);
                    
38    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ErrorContainer.php';\n";
                    
38    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ErrorContainer.php';\n";
                    
39    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ExceptionContainer.php';\n";
                    
40    file_put_contents($settings_filename, $settings_php);
                    
94    chmod($settings_filename, 0777);
                    
95    $settings_php = file_get_contents($settings_filename);
                    
96    $settings_php .= "\n";
                    
128  public function testMissingDependencyCustomErrorHandler() {
                    
129    $settings_filename = $this->siteDirectory . '/settings.php';
                    
130    chmod($settings_filename, 0777);
                    
130    chmod($settings_filename, 0777);
                    
131    $settings_php = file_get_contents($settings_filename);
                    
132    $settings_php .= "\n";
                    
                
css.php https://github.com/EthanBlast/Glam-Star-Life.git | PHP | 286 lines
                    
1<?php
                    
2function headway_css_global(){
                    
2function headway_css_global(){
                    
3	$global = file_get_contents(TEMPLATEPATH.'/media/css/global.css');
                    
4	$global .= file_get_contents(TEMPLATEPATH.'/media/css/wrapper.css');
                    
4	$global .= file_get_contents(TEMPLATEPATH.'/media/css/wrapper.css');
                    
5	$global .= file_get_contents(TEMPLATEPATH.'/media/css/forms.css');
                    
6	$global .= file_get_contents(TEMPLATEPATH.'/media/css/header.css');
                    
6	$global .= file_get_contents(TEMPLATEPATH.'/media/css/header.css');
                    
7	$global .= file_get_contents(TEMPLATEPATH.'/media/css/navigation.css');
                    
8	$global .= file_get_contents(TEMPLATEPATH.'/media/css/breadcrumbs.css');
                    
8	$global .= file_get_contents(TEMPLATEPATH.'/media/css/breadcrumbs.css');
                    
9	$global .= file_get_contents(TEMPLATEPATH.'/media/css/leafs.css');
                    
10	$global .= file_get_contents(TEMPLATEPATH.'/media/css/specific-leafs.css');
                    
10	$global .= file_get_contents(TEMPLATEPATH.'/media/css/specific-leafs.css');
                    
11	$global .= file_get_contents(TEMPLATEPATH.'/media/css/entries.css');
                    
12	$global .= file_get_contents(TEMPLATEPATH.'/media/css/comments.css');
                    
                
upgrade.php https://github.com/error10/Ushahidi_Web.git | PHP | 415 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
5 *
                    
6 * PHP version 5
                    
7 * LICENSE: This source file is subject to LGPL license
                    
151    	
                    
152    	$db_schema = file_get_contents( 'sql/upgrade.sql' );
                    
153		$result = "";
                    
194      	if( $upgrade->success ) {
                    
195      		//remove delete database.php and config.php files. we don't want to overwrite them.
                    
196     		unlink($working_dir."ushahidi/application/config/database.php");
                    
196     		unlink($working_dir."ushahidi/application/config/database.php");
                    
197     		unlink($working_dir."ushahidi/application/config/config.php");
                    
198           	$upgrade->remove_recursively($working_dir."ushahidi/application/cache");
                    
236		
                    
237		$upgrade_schema = @file_get_contents( 'sql/'.$upgrade_sql );
                    
238
                    
                
install-location.php https://github.com/nsswaga/OSClass.git | PHP | 418 lines
                    
96    try{
                    
97        require_once LIB_PATH . 'phpmailer/class.phpmailer.php' ;
                    
98        $mail = new PHPMailer(true) ;
                    
305    foreach($countries as $c) {
                    
306        $cities_json = osc_file_get_contents('http://geo.osclass.org/geo.download.php?action=city&country=' . urlencode($c->name) . '&region=' . urlencode(implode(',', $region)) . '&term=');
                    
307        $cities = json_decode($cities_json);
                    
338
                    
339    $countries_json = osc_file_get_contents('http://geo.osclass.org/geo.download.php?action=country&term='.  urlencode(implode(',', $country)) . '&install=true&version='.osc_version() );
                    
340    $countries = json_decode($countries_json);
                    
358    foreach($countries as $c) {
                    
359        $cities_json = osc_file_get_contents('http://geo.osclass.org/geo.download.php?action=city&country=' . urlencode($c->name) . '&term=' . urlencode(implode(',', $city)));
                    
360        $cities = json_decode($cities_json);
                    
362            foreach($cities as $ci) {
                    
363                $regions_json = osc_file_get_contents('http://geo.osclass.org/geo.download.php?action=region&country=&id=' . $ci->region_id);
                    
364                $regions = json_decode($regions_json);
                    
                
Compass.php https://github.com/vivid-planet/library.git | PHP | 511 lines
                    
1<?php
                    
2require_once dirname(__FILE__) . '/../ExtensionInterface.php';
                    
189            $mime = $info['mime'];
                    
190            $data = base64_encode(file_get_contents($path));
                    
191            # todo - do not return encoded if file size > 32kb
                    
209            $path = self::compassResolvePath(array_shift($args));
                    
210            $data = base64_encode(file_get_contents($path));
                    
211            $format = array_shift($args);
                    
                
plugin.class.php https://bitbucket.org/frchico/chamilo_openshift.git | PHP | 397 lines
                    
1<?php
                    
2/* For licensing terms, see /license.txt */
                    
28     * When creating a new course, these settings are added to the course, in 
                    
29     * the course_info/infocours.php
                    
30     * To show the plugin course icons you need to add these icons:
                    
139        $css = array();
                    
140        $css[] = file_get_contents($path);
                    
141        $result = implode($css);
                    
236            //1. Loading english if exists
                    
237            $english_path = $root.$plugin_name."/lang/english.php";
                    
238            if (is_readable($english_path)) {
                    
242
                    
243            $path = $root.$plugin_name."/lang/$language_interface.php";
                    
244            //2. Loading the system language
                    
322        if (!Database::num_rows($result)) {
                    
323            $tool_link = "$plugin_name/start.php";
                    
324            $visibility = string2binary(api_get_setting('course_create_active_tools', $plugin_name));
                    
                
CallbackAbstract.php https://bitbucket.org/haichau59/manga.git | PHP | 308 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: CallbackAbstract.php 24594 2012-01-05 21:27:01Z matthew $
                    
21 */
                    
25 */
                    
26//require_once 'Zend/Feed/Pubsubhubbub/CallbackInterface.php';
                    
27
                    
30 */
                    
31//require_once 'Zend/Feed/Pubsubhubbub/HttpResponse.php';
                    
32
                    
92        } elseif (!is_array($config)) {
                    
93            //require_once 'Zend/Feed/Pubsubhubbub/Exception.php';
                    
94            throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object'
                    
298    {
                    
299        $body = file_get_contents('php://input');
                    
300        if (strlen(trim($body)) == 0 && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
                    
                
WindowsAzure.php https://github.com/necrogami/zf2.git | PHP | 448 lines
                    
1<?php
                    
2/**
                    
55    const RETURN_STRING = 2; // return data as string
                    
56    const RETURN_STREAM = 3; // return PHP stream
                    
57
                    
179        if ($returnType == self::RETURN_STRING) {
                    
180            return file_get_contents($returnPath);
                    
181        }
                    
                
functions.inc.php https://github.com/mbehiels/pkp-lib.git | PHP | 336 lines
                    
17 * Emulate a Java-style import statement.
                    
18 * Simply includes the associated PHP file (using require_once so multiple calls to include the same file have no effect).
                    
19 * @param $class string the complete name of the class to be imported (e.g. 'lib.pkp.classes.core.Core')
                    
38
                    
39if (!function_exists('file_get_contents')) {
                    
40	// For PHP < 4.3.0
                    
85
                    
86	if ($showStackTrace && checkPhpVersion('4.3.0')) {
                    
87		echo "<h4>Stack Trace:</h4>\n";
                    
93		// Back-trace pretty-printer adapted from the following URL:
                    
94		// http://ca3.php.net/manual/en/function.debug-backtrace.php
                    
95		// Thanks to diz at ysagoon dot com
                    
183	if (checkPhpVersion('5.0.0')) {
                    
184		// We use the PHP5 clone() syntax so that PHP4 doesn't
                    
185		// raise a parse error.
                    
                
class-wp-filesystem-ssh2.php https://gitlab.com/WPonEB/WPonEB | PHP | 599 lines
                    
21 *
                    
22 * Copy the ssh.so file it creates to your PHP Module Directory.
                    
23 * Open up your PHP.INI file and look for where extensions are placed.
                    
28 *
                    
29 * Note: as of WordPress 2.8, This utilises the PHP5+ function 'stream_get_contents'
                    
30 *
                    
57		if ( ! extension_loaded('ssh2') ) {
                    
58			$this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available'));
                    
59			return;
                    
65					/* translators: %s: stream_get_contents() */
                    
66					__( 'The ssh2 PHP extension is available, however, we require the PHP5 function %s' ),
                    
67					'<code>stream_get_contents()</code>'
                    
170	 * this, the path is converted to /./ which is semantically the same as /
                    
171	 * See https://bugs.php.net/bug.php?id=64169 for more details.
                    
172	 *
                    
                
content_provider.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 379 lines
                    
1<?php
                    
2
                    
139		if ( $xmlg["useapi"] ) {
                    
140			$url = "http://" . $xmlg["site_base_url"] . "/api.php?format=php&action=query&prop=revisions&rvexpandtemplates=1&rvprop=timestamp|user|comment|content&titles=" . urlencode ( $title ) ;
                    
141			$data = @file_get_contents ( $url ) ;
                    
158		} else if ( $use_se ) {
                    
159			$url = "http://" . $xmlg["site_base_url"] . "/index.php?listauthors=1&title=Special:Export/" . urlencode ( $title ) ;
                    
160		} else {
                    
161			if ( $xmlg["use_toolserver_url"] ) {
                    
162#				$url = "http://" . $xmlg["site_base_url"] . "/index.php?action=raw&title=" . urlencode ( $title ) ;
                    
163				$u = urlencode ( $title ) ;
                    
164				$site = array_shift ( explode ( "/" , $xmlg["site_base_url"] ) ) ;
                    
165				$url = "http://tools.wikimedia.de/~daniel/WikiSense/WikiProxy.php?wiki={$site}&title={$u}&rev=0&go=Fetch" ;
                    
166			} else {
                    
166			} else {
                    
167				$url = "http://" . $xmlg["site_base_url"] . "/index.php?action=raw&title=" . urlencode ( $title ) ;
                    
168			}
                    
                
ProjectTaskTest.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 386 lines
                    
6 *
                    
7 * CakePHP : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @link          http://cakephp.org CakePHP Project
                    
16 * @package       Cake.Test.Case.Console.Command.Task
                    
168		$this->assertTrue(is_dir($this->Task->args[0]), 'No project dir');
                    
169		$contents = file_get_contents($path . DS . 'webroot' . DS . 'index.php');
                    
170		$this->assertRegExp('#//define\(\'CAKE_CORE_INCLUDE_PATH#', $contents);
                    
171
                    
172		$contents = file_get_contents($path . DS . 'webroot' . DS . 'test.php');
                    
173		$this->assertRegExp('#//define\(\'CAKE_CORE_INCLUDE_PATH#', $contents);
                    
228
                    
229		$File = new File($path . 'Config' . DS . 'core.php');
                    
230		$contents = $File->read();
                    
                
ProfilerController.php https://bitbucket.org/vvanuytven/php_auto.git | PHP | 422 lines
                    
1<?php
                    
2
                    
176
                    
177        if (!$profile = $this->profiler->import(file_get_contents($file->getPathname()))) {
                    
178            return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'already_exists')));
                    
389    /**
                    
390     * Displays the PHP info.
                    
391     *
                    
393     */
                    
394    public function phpinfoAction()
                    
395    {
                    
402        ob_start();
                    
403        phpinfo();
                    
404        $phpinfo = ob_get_clean();
                    
405
                    
406        return new Response($phpinfo);
                    
407    }
                    
                
PaginationPaginatorTest.php https://gitlab.com/tillkruss/framework | PHP | 268 lines
                    
1<?php
                    
2
                    
10
                    
11class PaginationPaginatorTest extends PHPUnit_Framework_TestCase
                    
12{
                    
112
                    
113        $this->assertEquals(trim(file_get_contents(__DIR__.'/fixtures/slider.html')), $presenter->render());
                    
114    }
                    
124
                    
125        $this->assertEquals(trim(file_get_contents(__DIR__.'/fixtures/slider_bs4.html')), $presenter->render());
                    
126    }
                    
152
                    
153        $this->assertEquals(trim(file_get_contents(__DIR__.'/fixtures/beginning.html')), $presenter->render());
                    
154    }
                    
164
                    
165        $this->assertEquals(trim(file_get_contents(__DIR__.'/fixtures/beginning_bs4.html')), $presenter->render());
                    
166    }
                    
                
dalliancepj.inc.php https://gitlab.com/nacridan/Nacridan | PHP | 227 lines
                    
1<?php
                    
2
                    
31            $fieldname = "id_Player\$dest";
                    
32            $formtarget = "<form method='POST' action='" . CONFIG_HOST . '/diplomacy/diplomacy.php?center=alliancepj&pj=1' . "' target='_self'>";
                    
33        } else {
                    
36            $fieldname = "id_Team";
                    
37            $formtarget = "<form method='POST' action='" . CONFIG_HOST . '/diplomacy/diplomacy.php?center=alliancepj' . "' target='_self'>";
                    
38        }
                    
41            if (! $this->nacridan->isRepostForm()) {
                    
42                require_once (HOMEPATH . "/factory/TeamFactory.inc.php");
                    
43                
                    
60            } else {
                    
61                $str = eval(file_get_contents(HOMEPATH . "/include/reposterror.inc.php"));
                    
62            }
                    
                
example09_forms.php https://gitlab.com/varsha_evonix/intranet | PHP | 204 lines
                    
1<?php
                    
2
                    
6define('_MPDF_PATH','../');
                    
7include("../mpdf.php");
                    
8
                    
176//==============================================================
                    
177if (isset($_REQUEST['html'])) { echo '<html><head><style>'.file_get_contents('mpdfstyletables.css').'</style></head><body>'.$html.'</body></html>'; exit; }
                    
178if (isset($_REQUEST['source'])) { 
                    
192// LOAD a stylesheet
                    
193$stylesheet = file_get_contents('mpdfstyletables.css');
                    
194$mpdf->WriteHTML($stylesheet,1);	// The parameter 1 tells that this is css/style only and no body/html/text
                    
                
plugin.class.php https://bitbucket.org/hanutimes/hanutimes.git | PHP | 397 lines
                    
1<?php
                    
2/* For licensing terms, see /license.txt */
                    
28     * When creating a new course, these settings are added to the course, in
                    
29     * the course_info/infocours.php
                    
30     * To show the plugin course icons you need to add these icons:
                    
139        $css = array();
                    
140        $css[] = file_get_contents($path);
                    
141        $result = implode($css);
                    
236            //1. Loading english if exists
                    
237            $english_path = $root.$plugin_name."/lang/english.php";
                    
238            if (is_readable($english_path)) {
                    
242
                    
243            $path = $root.$plugin_name."/lang/$language_interface.php";
                    
244            //2. Loading the system language
                    
322        if (!Database::num_rows($result)) {
                    
323            $tool_link = "$plugin_name/start.php";
                    
324            $visibility = Text::string2binary(api_get_setting('course_create_active_tools', $plugin_name));
                    
                
import_test.php https://github.com/harriswong/ATutor.git | PHP | 339 lines
                    
1<?php
                    
2/************************************************************************/
                    
13define('AT_INCLUDE_PATH', '../../../include/');
                    
14require(AT_INCLUDE_PATH.'vitals.inc.php');
                    
15require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php'); /* for clr_dir() and preImportCallBack and dirsize() */
                    
15require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php'); /* for clr_dir() and preImportCallBack and dirsize() */
                    
16require(AT_INCLUDE_PATH.'../mods/_core/imsqti/lib/qti.inc.php'); 
                    
17require(AT_INCLUDE_PATH.'classes/pclzip.lib.php');
                    
17require(AT_INCLUDE_PATH.'classes/pclzip.lib.php');
                    
18//require(AT_INCLUDE_PATH.'classes/QTI/QTIParser.class.php');	
                    
19require(AT_INCLUDE_PATH.'../mods/_core/imsqti/classes/QTIImport.class.php');
                    
36	$msg->addFeedback('IMPORT_CANCELLED');
                    
37	header('Location: index.php');
                    
38	exit;
                    
100
                    
101		header('Location: ./index.php');
                    
102		exit;
                    
                
example06_tables_nested.php https://bitbucket.org/vsposato/vivo-tools.git | PHP | 532 lines
                    
1<?php
                    
2
                    
513//==============================================================
                    
514include("../mpdf.php");
                    
515
                    
522// LOAD a stylesheet
                    
523$stylesheet = file_get_contents('mpdfstyletables.css');
                    
524$mpdf->WriteHTML($stylesheet,1);	// The parameter 1 tells that this is css/style only and no body/html/text
                    
                
Yaml.php https://github.com/basdog22/Qool.git | PHP | 381 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version   $Id: Yaml.php 24594 2012-01-05 21:27:01Z matthew $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Config.php';
                    
26
                    
101        if (!is_callable($yamlDecoder)) {
                    
102            require_once 'Zend/Config/Exception.php';
                    
103            throw new Zend_Config_Exception('Invalid parameter to setYamlDecoder() - must be callable');
                    
133        if (empty($yaml)) {
                    
134            require_once 'Zend/Config/Exception.php';
                    
135            throw new Zend_Config_Exception('Filename is not set');
                    
168        set_error_handler(array($this, '_loadFileErrorHandler'));
                    
169        $yaml = file_get_contents($yaml);
                    
170        restore_error_handler();
                    
                
Gateway.php https://github.com/tryonn/sacd_flex.git | PHP | 425 lines
                    
33{
                    
34	require_once(AMFPHP_BASE . "shared/util/CompatPhp5.php");
                    
35}
                    
37{
                    
38	require_once(AMFPHP_BASE . "shared/util/CompatPhp4.php");
                    
39}
                    
41require_once(AMFPHP_BASE . "shared/util/CharsetHandler.php");
                    
42require_once(AMFPHP_BASE . "shared/util/NetDebug.php");
                    
43require_once(AMFPHP_BASE . "shared/util/Headers.php");
                    
77			include_once(AMFPHP_BASE . "shared/app/php5Executive.php");
                    
78			include_once(AMFPHP_BASE . "shared/exception/php5Exception.php");
                    
79		}
                    
83			include_once(AMFPHP_BASE . "shared/app/php4Executive.php");
                    
84			include_once(AMFPHP_BASE . "shared/exception/php4Exception.php");
                    
85		}
                    
                
PluginLoader.php https://gitlab.com/rsilveira1987/Expresso | PHP | 475 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: PluginLoader.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
23/** Zend_Loader_PluginLoader_Interface */
                    
24require_once 'Zend/Loader/PluginLoader/Interface.php';
                    
25
                    
26/** Zend_Loader */
                    
27require_once 'Zend/Loader.php';
                    
28
                    
141        if (!is_string($prefix) || !is_string($path)) {
                    
142            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
143            throw new Zend_Loader_PluginLoader_Exception('Zend_Loader_PluginLoader::addPrefixPath() method only takes strings for prefix and path.');
                    
241        if (!isset($registry[$prefix])) {
                    
242            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
243            throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.');
                    
                
extract.php https://github.com/mozilla/phpbb3-static.git | PHP | 390 lines
                    
10  $categories = array();
                    
11  if ($phpbb_version == PHPBB2) {
                    
12    $res = $db->query("SELECT cat_id, cat_title FROM {$db_prefix}categories " .
                    
227  // Get details of each forum.
                    
228  if ($phpbb_version == PHPBB2) {
                    
229    $res = $db->query("SELECT forum_id, forum_name, forum_posts, forum_topics FROM {$db_prefix}forums ORDER BY forum_order;");
                    
259        );
                    
260    } elseif ($phpbb3_minor_version == 1 || $phpbb3_minor_version == 2) {
                    
261        $forums[$fid] = array(
                    
294    );
                    
295} elseif ($phpbb3_minor_version == 1 || $phpbb3_minor_version == 2) {
                    
296    $res = $db->query(<<<SQL
                    
333        );
                    
334    } elseif ($phpbb3_minor_version == 1 || $phpbb3_minor_version == 2) {
                    
335        $topics[$row['topic_id']] = array(
                    
                
Config.php https://gitlab.com/matthww/Elywing | PHP | 462 lines
                    
1<?php
                    
2
                    
130			if($this->correct === true){
                    
131				$content = file_get_contents($this->file);
                    
132				switch($this->type){
                    
                
ExtensibleInterfacesTest.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 265 lines
                    
1<?php
                    
2/**
                    
15 */
                    
16class ExtensibleInterfacesTest extends \PHPUnit_Framework_TestCase
                    
17{
                    
31                $errors = [];
                    
32                $fileContent = file_get_contents($filename);
                    
33                $extendsFromExtensibleDataInterface = preg_match(
                    
165                $errors = [];
                    
166                $fileContent = file_get_contents($filename);
                    
167                $extensibleClassPattern = 'class [^\{]+extends[^\{]+AbstractExtensible';
                    
193            },
                    
194            $this->getPhpFiles()
                    
195        );
                    
204    {
                    
205        $codeInterfaceFiles = $this->getFiles(BP . '/app', '*Interface.php');
                    
206        $libInterfaceFiles = $this->getFiles(BP . '/lib/Magento', '*Interface.php');
                    
                
wp-cache-phase1.php https://github.com/brandonburke/WordPress-Plugin-Baseline.git | PHP | 264 lines
                    
1<?php
                    
2// Pre-2.6 compatibility
                    
5
                    
6if( !include( WP_CONTENT_DIR . '/wp-cache-config.php' ) )
                    
7	return true;
                    
10
                    
11include( WPCACHEHOME . 'wp-cache-base.php');
                    
12
                    
26
                    
27require_once( WPCACHEHOME . 'wp-cache-phase2.php');
                    
28
                    
28
                    
29$plugins = glob( $wp_cache_plugins_dir . '/*.php' );
                    
30if( is_array( $plugins ) ) {
                    
48function gzip_accepted(){
                    
49	if( ini_get( 'zlib.output_compression' ) ) // don't compress WP-Cache data files when PHP is already doing it
                    
50		return false;
                    
                
admin_moduleupdates.php https://github.com/tbleher/gallery3-contrib.git | PHP | 364 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");/**
                    
2 * Gallery - a web based photo album viewer and editor
                    
122		} else {
                    
123			fwrite($fp,file_get_contents("http://www.gallerymodules.com/gallerymodules.ini"));
                    
124		    	fclose($fp);
                    
125
                    
126			fwrite($fp2,file_get_contents("http://www.gallerymodules.com/core.ini"));
                    
127		    	fclose($fp2);
                    
                
index.php https://gitlab.com/skortekaas/PHP-SMTP-ContactForm | PHP | 319 lines
                    
5* It is a fully responsive HTML5 - JavaScript contact form. It can send emails through the PHP mail() function or through a
                    
6* SMTP server by making use of the PHPMailer class (https://github.com/phpmailer/phpmailer)
                    
7* 
                    
20* 
                    
21* PHP-SMTP-ContactForm is distributed in the hope that it will be useful,
                    
22* but WITHOUT ANY WARRANTY; without even the implied warranty of
                    
85			* This will send the email by SMTP making use of the PHPMailer class
                    
86			* https://github.com/phpmailer/phpmailer
                    
87			* You need to install this on your website
                    
94			//Set the right path to PHPMailerAutoload.php
                    
95			require 'PHPMailerAutoload.php';
                    
96		
                    
224                <h4><?php if(!empty($errMsg)): ?><div class="errMsg"><?php echo $errMsg; ?></div><?php endif; ?></h4>
                    
225                <h4><?php if(!empty($succMsg)): ?><div class="succMsg"><?php echo $succMsg; ?></div><?php endif; ?></h4>
                    
226                <h3>Title</h3>
                    
                
error_exception.php https://gitlab.com/sejator/posci4 | PHP | 401 lines
                    
1<?php $error_id = uniqid('error', true); ?>
                    
2<!doctype html>
                    
9	<style type="text/css">
                    
10		<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
                    
11	</style>
                    
13	<script type="text/javascript">
                    
14		<?= file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.js') ?>
                    
15	</script>
                    
34
                    
35		<?php if (is_file($file)) : ?>
                    
36			<div class="source">
                    
38			</div>
                    
39		<?php endif; ?>
                    
40	</div>
                    
392				Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
                    
393				PHP: <?= esc(phpversion()) ?>  &mdash;
                    
394				CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?>
                    
                
Local.php https://gitlab.com/riandy_db/self-monitoring | PHP | 512 lines
                    
1<?php
                    
2
                    
208        $location = $this->applyPathPrefix($path);
                    
209        $contents = file_get_contents($location);
                    
210
                    
                
Action.class.php https://gitlab.com/llwhois/woaimm | PHP | 344 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
12/**
                    
13 * ThinkPHP Action控制器基类 精简模式
                    
14 * @category   Think
                    
128                case '_post':$input =& $_POST;break;
                    
129                case '_put': parse_str(file_get_contents('php://input'), $input);break;
                    
130                case '_request': $input =& $_REQUEST;break;
                    
319        $result   =  tag('view_parse',$params);
                    
320        if(false === $result) { // 未定义行为 则采用PHP原生模板
                    
321            // 模板阵列变量分解成为独立变量
                    
                
index.php https://github.com/hinablue/TextCube.git | PHP | 280 lines
                    
133?>
                    
134										<img src="<?php echo $context->getProperty('service.path');?>/skin/blog/<?php echo $skinSetting['skin'];?>/preview.jpg" width="150" height="150" alt="<?php echo _t('스킨 미리보기');?>" />
                    
135<?php
                    
137?>
                    
138										<img src="<?php echo $context->getProperty('service.path');?>/skin/blog/<?php echo $skinSetting['skin'];?>/preview.gif" width="150" height="150" alt="<?php echo _t('스킨 미리보기');?>" />
                    
139<?php
                    
141?>
                    
142										<img src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/image/noPreview.gif" width="150" height="150" alt="<?php echo _t('스킨 미리보기');?>" />
                    
143<?php
                    
251										<div id="button_<?php echo $skin['name'];?>" class="button-box">
                    
252											<a class="preview-button button" href="<?php echo $context->getProperty('uri.blog');?>/owner/skin/preview/?skin=<?php echo $skin['name'];?>" onclick="window.open(this.href, &quot;<?php echo $skin['name'];?>&quot;,&quot;location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0&quot;); return false;"><span><?php echo _t('미리보기');?></span></a>
                    
253											<span class="hidden">|</span>
                    
253											<span class="hidden">|</span>
                    
254											<a class="apply-button button" href="<?php echo $context->getProperty('uri.blog');?>/owner/skin/change/?skinName=<?php echo urlencode($skin['name']);?>" onclick="selectSkin('<?php echo $skin['name'];?>'); return false;"><span><?php echo _t('적용');?></span></a>
                    
255										</div>
                    
                
ConfigForm.php https://bitbucket.org/hamaswa/destinationgreece.git | PHP | 368 lines
                    
1<?php
                    
2
                    
61    public static function getCSS() {
                    
62        return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css');
                    
63    }
                    
68    public static function getJavaScript() {
                    
69        return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js');
                    
70    }
                    
265                case HTMLPurifier_VarParser::ALIST:
                    
266                    $value = implode(PHP_EOL, $value);
                    
267                    break;
                    
270                    foreach ($value as $i => $v) {
                    
271                        $nvalue .= "$i:$v" . PHP_EOL;
                    
272                    }
                    
                
YamlFileLoader.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 236 lines
                    
1<?php
                    
2
                    
60        try {
                    
61            $parsedConfig = $this->yamlParser->parse(file_get_contents($path));
                    
62        } catch (ParseException $e) {
                    
                
sale_note_a5.blade.php https://gitlab.com/laher01/factu40 | PHP | 230 lines
                    
1@php
                    
2    $establishment = $document->establishment;
                    
8
                    
9@endphp
                    
10<html>
                    
20                <div class="company_logo_box">
                    
21                    <img src="data:{{mime_content_type(public_path("storage/uploads/logos/{$company->logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo" style="max-width: 150px;">
                    
22                </div>
                    
148                @if($row->discounts)
                    
149                    @php
                    
150                        $total_discount_line = 0;
                    
153                        }
                    
154                    @endphp
                    
155                    {{ number_format($total_discount_line, 2) }}
                    
215    <strong>PAGOS:</strong> </td></tr>
                    
216        @php
                    
217            $payment = 0;
                    
                
Json.php https://github.com/kervin/kyzstudio.git | PHP | 240 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version   $Id: Json.php 23294 2010-11-05 00:27:34Z ramon $
                    
20 */
                    
24 */
                    
25#require_once 'Zend/Config.php';
                    
26
                    
29 */
                    
30#require_once 'Zend/Json.php';
                    
31
                    
84        if (empty($json)) {
                    
85            #require_once 'Zend/Config/Exception.php';
                    
86            throw new Zend_Config_Exception('Filename is not set');
                    
114        if ($json[0] != '{') {
                    
115            $json = file_get_contents($json);
                    
116        }
                    
                
lxins.php https://github.com/lxcenter/hypervm.git | PHP | 248 lines
                    
1<?PHP
                    
2//
                    
21
                    
22<?php
                    
23
                    
23
                    
24// PHp4, without the lxlabs infrastructure... The code is very bad, primarily because it falls outside the lxlabs framework, and has to work on php4 too, which is something we have no experience in. We need to move as much of the activities to code after the installation of the lxlabs framework.
                    
25
                    
121		run_package_installer($list);
                    
122		if (file_exists("/usr/local/lxlabs/ext/php/php")) {
                    
123			break;
                    
169	chdir("/usr/local/lxlabs/hypervm/httpdocs/");
                    
170	system("/bin/cp /usr/local/lxlabs/hypervm/httpdocs/htmllib/filecore/php.ini /usr/local/lxlabs/ext/php/etc/php.ini");
                    
171	system("/usr/local/lxlabs/ext/php/php ../bin/install/create.php --install-type=$installtype --db-rootuser=$dbroot --db-rootpassword=$dbpass");
                    
189//
                    
190	passthru("/usr/local/lxlabs/ext/php/php ../bin/install/virt-install.php --install-type=$installtype --virtualization-type=$virtualization $skiparg");
                    
191
                    
                
fix_style.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 320 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * A PHP code beautifier aimed at adding lots of spaces to files that lack them,
                    
5 * in keeping with MediaWiki's spacey site style.
                    
8
                    
9if ( php_sapi_name() != 'cli' ) {
                    
10    print "This script must be run from the command line\n";
                    
40foreach ( $files as $file ) {
                    
41	if ( substr( $file, - 4 ) == '.php' ) {
                    
42		print 'do style: ' . $file . "\n";
                    
62    if ( $filename == '-' ) {
                    
63        $s = file_get_contents( '/dev/stdin' );
                    
64        if ( $s === false ) {
                    
70    } else {
                    
71        $s = file_get_contents( $filename );
                    
72        if ( $s === false ) {
                    
                
TitleBlacklist.list.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 478 lines
                    
1<?php
                    
2/**
                    
112			if( file_exists( $source['src'] ) ) {
                    
113				return file_get_contents( $source['src'] );
                    
114			} else {
                    
                
DirectoryTest.php https://gitlab.com/mohamed_hussein/prodt | PHP | 247 lines
                    
1<?php
                    
2
                    
79    $file_system = \Drupal::service('file_system');
                    
80    if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
81      // PHP on Windows doesn't support any kind of useful read-only mode for
                    
81      // PHP on Windows doesn't support any kind of useful read-only mode for
                    
82      // directories. When executing a chmod() on a directory, PHP only sets the
                    
83      // read-only flag, which doesn't prevent files to actually be written
                    
110    // Verify contents of .htaccess file.
                    
111    $file = file_get_contents($default_scheme . '://.htaccess');
                    
112    $this->assertEquals(FileSecurity::htaccessLines(FALSE), $file, 'The .htaccess file contains the proper content.');
                    
                
file.php https://bitbucket.org/d1rk/cakephp-including-capistrano.git | PHP | 508 lines
                    
1<?php
                    
2/* SVN FILE: $Id: file.php 8189 2009-06-04 21:29:26Z DarkAngelBGE $ */
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
7 *
                    
8 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
9 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
15 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
16 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
17 * @package       cake
                    
18 * @subpackage    cake.cake.libs
                    
19 * @since         CakePHP(tm) v 0.2.9
                    
20 * @version       $Revision: 8189 $
                    
22 * @lastmodified  $Date: 2009-06-04 23:29:26 +0200 (Do, 04. Jun 2009) $
                    
23 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
24 */
                    
                
ReleaseController.php https://gitlab.com/brucealdridge/yii2 | PHP | 211 lines
                    
1<?php
                    
2/**
                    
70        foreach($this->getChangelogs() as $file) {
                    
71            $lines = explode("\n", file_get_contents($file));
                    
72            $hl = [
                    
121    {
                    
122        $lines = explode("\n", file_get_contents($file));
                    
123
                    
201            "function getVersion()\n    {\n        return '$version';",
                    
202            YII2_PATH . '/BaseYii.php');
                    
203    }
                    
207        foreach((array) $files as $file) {
                    
208            file_put_contents($file, preg_replace($pattern, $replace, file_get_contents($file)));
                    
209        }
                    
                
FileLockRegion.php https://gitlab.com/mario.uriarte/doctrine2.5-tutorial | PHP | 265 lines
                    
1<?php
                    
2
                    
130    {
                    
131        return @file_get_contents($filename);
                    
132    }
                    
                
SendEventNotificationsTest.php https://github.com/sidealice/zf2.git | PHP | 126 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class SendEventNotificationsTest extends \PHPUnit_Framework_TestCase
                    
38{
                    
40    public function setUp() {
                    
41        $this->sendEventNotificationsText = file_get_contents(
                    
42                'Zend/GData/Calendar/_files/SendEventNotificationsElementSample1.xml',
                    
                
DumpCommandTest.php https://gitlab.com/freebird/WebApp | PHP | 220 lines
                    
1<?php
                    
2
                    
18
                    
19class DumpCommandTest extends \PHPUnit_Framework_TestCase
                    
20{
                    
158        $this->assertFileExists($this->writeTo.'/test_asset.css');
                    
159        $this->assertEquals('/* test_asset */', file_get_contents($this->writeTo.'/test_asset.css'));
                    
160    }
                    
216        $this->assertFileExists($this->writeTo.'/test_leaf.css');
                    
217        $this->assertEquals('/* test_asset */', file_get_contents($this->writeTo.'/test_asset.css'));
                    
218        $this->assertEquals('/* test_leaf */', file_get_contents($this->writeTo.'/test_leaf.css'));
                    
                
WebContentTest.php https://github.com/mfairchild365/zf2.git | PHP | 142 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class WebContentTest extends \PHPUnit_Framework_TestCase
                    
38{
                    
40    public function setUp() {
                    
41        $this->webContentText = file_get_contents(
                    
42                'Zend/GData/Calendar/_files/WebContentElementSample1.xml',
                    
                
smarty_internal_config.php https://github.com/lewellyn/TrellisDesk.git | PHP | 302 lines
                    
1<?php
                    
2/**
                    
119        $_compile_dir = $this->smarty->getCompileDir();
                    
120        return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php';
                    
121    }
                    
162            } else {
                    
163                $this->compiled_config = file_get_contents($this->getCompiledFilepath());
                    
164            }
                    
                
StringPresenter.php https://gitlab.com/judielsm/Handora | PHP | 488 lines
                    
3/*
                    
4 * This file is part of PhpSpec, A php toolset to drive emergent
                    
5 * design by specification.
                    
16use Exception;
                    
17use PhpSpec\Exception\Exception as PhpSpecException;
                    
18use PhpSpec\Exception\Example\NotEqualException;
                    
18use PhpSpec\Exception\Example\NotEqualException;
                    
19use PhpSpec\Exception\Example\ErrorException;
                    
20use PhpSpec\Exception\Example\PendingException;
                    
42    /**
                    
43     * The PhpSpec Runner base path.
                    
44     *
                    
44     *
                    
45     * This property is used as a constant but PHP does not support setting the value with dirname().
                    
46     *
                    
                
file.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 540 lines
                    
1<?php
                    
2/**
                    
296	 * @since   11.1
                    
297	 * @deprecated  13.3  Use the native file_get_contents() instead.
                    
298	 */
                    
300	{
                    
301		JLog::add(__METHOD__ . ' is deprecated. Use native file_get_contents() syntax.', JLog::WARNING, 'deprecated');
                    
302
                    
415	 *
                    
416	 * @param   string   $src          The name of the php (temporary) uploaded file
                    
417	 * @param   string   $dest         The path (including filename) to move the uploaded file to
                    
                
GeneratedObjectLobTest.php https://github.com/1989gaurav/Propel.git | PHP | 293 lines
                    
1<?php
                    
2
                    
10
                    
11require_once dirname(__FILE__) . '/../../../../tools/helpers/bookstore/BookstoreEmptyTestBase.php';
                    
12
                    
84		$m1->setBook($book);
                    
85		$m1->setCoverImage(file_get_contents($blob_path));
                    
86		$m1->setExcerpt(file_get_contents($clob_path));
                    
113	 *
                    
114	 * @link       http://propel.phpdb.org/trac/ticket/531
                    
115	 */
                    
124		$m1->setBook($book);
                    
125		$m1->setCoverImage(file_get_contents($blob_path));
                    
126		$m1->setExcerpt(file_get_contents($clob_path));
                    
192		$m1->setBook($book);
                    
193		$m1->setCoverImage(file_get_contents($blob_path));
                    
194		$m1->setExcerpt(file_get_contents($clob_path));
                    
                
Csv.php https://gitlab.com/Japang-Jawara/jawara-penilaian | PHP | 534 lines
                    
1<?php
                    
2
                    
2
                    
3namespace PhpOffice\PhpSpreadsheet\Reader;
                    
4
                    
5use InvalidArgumentException;
                    
6use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
                    
7use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
                    
7use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
                    
8use PhpOffice\PhpSpreadsheet\Spreadsheet;
                    
9
                    
305            fclose($this->fileHandle);
                    
306            $entireFile = file_get_contents($pFilename);
                    
307            $this->fileHandle = fopen('php://memory', 'r+b');
                    
314    /**
                    
315     * Loads PhpSpreadsheet from file into PhpSpreadsheet instance.
                    
316     *
                    
                
QueryTest.php https://bitbucket.org/pcelta/zf2.git | PHP | 359 lines
                    
1<?php
                    
2/**
                    
24 */
                    
25class QueryTest extends \PHPUnit_Framework_TestCase
                    
26{
                    
43        if (null === $this->html) {
                    
44            $this->html  = file_get_contents(__DIR__ . '/_files/sample.xhtml');
                    
45        }
                    
191
                    
192    public function testXpathPhpFunctionsShouldBeDisableByDefault()
                    
193    {
                    
195        try {
                    
196            $this->query->queryXpath('//meta[php:functionString("strtolower", @http-equiv) = "content-type"]');
                    
197        } catch (\Exception $e) {
                    
199        }
                    
200        $this->assertFails('XPath PHPFunctions should be disable by default');
                    
201    }
                    
                
Tree.php https://bitbucket.org/jonphipps/elefant-vocabhub.git | PHP | 438 lines
                    
1<?php
                    
2
                    
82        $this->file = $file;
                    
83		$this->tree = json_decode (file_exists ($file) ? file_get_contents ($file) : '[]');
                    
84		if (json_last_error () != JSON_ERROR_NONE || ! is_array ($this->tree)) {
                    
                
t2tx.php https://github.com/wolli/t2tx.git | PHP | 452 lines
                    
1#!/usr/bin/php
                    
2<?php
                    
8 * @version 1.1
                    
9 * @license New BSD license (http://opensource.org/licenses/bsd-license.php)
                    
10 *
                    
149            $this->_filename = $content;
                    
150            $html = file_get_contents($this->_filename);
                    
151        } else {
                    
                
bbcode.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 199 lines
                    
72global $login;
                    
73$var = preg_replace(array('#\[php\](.*?)\[\/php\]#se'), array("''.highlight('$1').''"), str_replace("]\n", "]", $var));
                    
74$var = preg_replace('#\[code\](.*?)\[/code\]#si', '<div class="bmenu">Mã</div><div class="quote">\1</div>', $var);
                    
181function highlight($php) {
                    
182$php = strtr($php, array (
                    
183'<br />' => '',
                    
187$php = html_entity_decode(trim($php), ENT_QUOTES, 'UTF-8');
                    
188$php = substr($php, 0, 2) != "<?" ? $php = "<?php\n" . $php . "\n?>" : $php;
                    
189$php = highlight_string(stripslashes($php), true);
                    
189$php = highlight_string(stripslashes($php), true);
                    
190$php = strtr($php, array (
                    
191'slash_JOHNCMS' => '&#92;',
                    
196
                    
197return '<div class="phpcode">' . $php . '</div>';
                    
198}
                    
                
Wechat.class.php https://gitlab.com/colin.luo/shbs | PHP | 323 lines
                    
1<?php
                    
2class Wechat {
                    
22		if (IS_GET) {
                    
23			$xml = file_get_contents("php://input");
                    
24			if ($this->wxuser['public_type'] == "企业号") {
                    
47			
                    
48			$xml = file_get_contents("php://input");
                    
49			if ($this->wxuser['public_type'] == '企业号') {
                    
264    // jsapi_ticket 应该全局存储与更新,以下代码以写入到文件中做示例
                    
265    $data = json_decode(file_get_contents("jsapi_ticket.json"));
                    
266    if ($data->expire_time < time()) {
                    
288    // access_token 应该全局存储与更新,以下代码以写入到文件中做示例
                    
289    $data = json_decode(file_get_contents("access_token.json"));
                    
290    if ($data->expire_time < time()) {
                    
                
StringPresenter.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 492 lines
                    
3/*
                    
4 * This file is part of PhpSpec, A php toolset to drive emergent
                    
5 * design by specification.
                    
16use Exception;
                    
17use PhpSpec\Exception\Exception as PhpSpecException;
                    
18use PhpSpec\Exception\Example\NotEqualException;
                    
18use PhpSpec\Exception\Example\NotEqualException;
                    
19use PhpSpec\Exception\Example\ErrorException;
                    
20use PhpSpec\Exception\Example\PendingException;
                    
43     */
                    
44    private $phpspecPath;
                    
45
                    
46    /**
                    
47     * The PhpSpec Runner base path.
                    
48     *
                    
                
skinsExport.php https://bitbucket.org/ferOnti/processmaker.git | PHP | 187 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * skinsExport.php
                    
5 *
                    
27{
                    
28    $content = file_get_contents( $input );
                    
29    $filename = $output . PATH_SEP . basename( $input );
                    
92    //verify if plugin exists,
                    
93    $pluginClassFilename = PATH_PLUGINS . $pluginName . PATH_SEP . 'class.' . $pluginName . '.php';
                    
94    if ( !is_file ( $pluginClassFilename ) ) {
                    
102
                    
103    //$tar->createModify( $pathHome . PATH_SEP . $pluginName . '.php' ,'', $pathHome);
                    
104    addTarFolder( $tar, $pathBase, $pathHome );
                    
136
                    
137$oConf = unserialize( file_get_contents( $fileObj ) );
                    
138$oConf->version += 1;
                    
                
ProjectCleanTaskTest.php https://github.com/Proudio-Interactive/phpUnderControl.git | PHP | 360 lines
                    
96            "/cruisecontrol/logs/{$this->projectName}/log20071211211853.xml",
                    
97            file_get_contents( PHPUC_TEST_LOGS . '/log20071211211853.xml' )
                    
98        );
                    
100            "/cruisecontrol/logs/{$this->projectName}/log20071211220903Lbuild.3.xml",
                    
101            file_get_contents( PHPUC_TEST_LOGS . '/log20071211220903Lbuild.3.xml' )
                    
102        );
                    
104            "/cruisecontrol/logs/{$this->projectName}/log20071217180035Lbuild.18.xml",
                    
105            file_get_contents( PHPUC_TEST_LOGS . '/log20071217180035Lbuild.18.xml' )
                    
106        );
                    
108            "/cruisecontrol/logs/{$this->projectName}/log20080106030401Lbuild.24.xml",
                    
109            file_get_contents( PHPUC_TEST_LOGS . '/log20080106030401Lbuild.24.xml' )
                    
110        );
                    
112            "/cruisecontrol/logs/{$this->projectName}/log20080109182028Lbuild.30.xml",
                    
113            file_get_contents( PHPUC_TEST_LOGS . '/log20080109182028Lbuild.30.xml' )
                    
114        );
                    
                
locallib.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 229 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
25
                    
26require_once("$CFG->dirroot/webservice/lib.php");
                    
27
                    
96    protected function fetch_input_content() {
                    
97        return file_get_contents('php://input');
                    
98    }
                    
224        $token = $url->get_param('wstoken');
                    
225        require_once($CFG->dirroot . '/webservice/xmlrpc/lib.php');
                    
226        $client = new webservice_xmlrpc_client($serverurl, $token);
                    
                
ActivityEntryTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 153 lines
                    
1<?php
                    
2/**
                    
22
                    
23require_once 'Zend/Gdata/YouTube/ActivityEntry.php';
                    
24require_once 'Zend/Gdata/YouTube.php';
                    
34 */
                    
35class Zend_Gdata_YouTube_ActivityEntryTest extends PHPUnit_Framework_TestCase
                    
36{
                    
38    public function setUp() {
                    
39        $this->entryText = file_get_contents(
                    
40                'Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml',
                    
                
EmailListEntryTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 140 lines
                    
1<?php
                    
2/**
                    
22
                    
23require_once 'Zend/Gdata/Gapps/EmailListEntry.php';
                    
24require_once 'Zend/Gdata/Gapps.php';
                    
34 */
                    
35class Zend_Gdata_Gapps_EmailListEntryTest extends PHPUnit_Framework_TestCase
                    
36{
                    
38    public function setUp() {
                    
39        $this->entryText = file_get_contents(
                    
40                'Zend/Gdata/Gapps/_files/EmailListEntryDataSample1.xml',
                    
                
smarty_internal_cacheresource_file.php https://gitlab.com/staging06/myproject | PHP | 300 lines
                    
1<?php
                    
2/**
                    
62        }
                    
63        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
                    
64        $cached->timestamp = @filemtime($cached->filepath);
                    
196            foreach ($_cache as $_file) {
                    
197				if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, 'index.php') !== false) {
                    
198                    continue;
                    
234                        if ($exp_time < 0) {
                    
235                            preg_match('#\'cache_lifetime\' =>\s*(\d*)#', file_get_contents($_file), $match);
                    
236                            if ($_time < (@filemtime($_file) + $match[1])) {
                    
262    {
                    
263        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
264            clearstatcache(true, $cached->lock_id);
                    
                
install.un.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 272 lines
                    
1<?php
                    
2
                    
14
                    
15include_once 'init.php';
                    
16
                    
38$vm2 = false;
                    
39$vmVersionFile = dirname(__FILE__).DS.'..'.DS.'com_virtuemart'.DS.'version.php';
                    
40if(file_exists($vmVersionFile)) {
                    
62                // jm 1.0
                    
63                JFile::move($to . DS . 'mod_virtuemart_magiczoomplus.php', $to . DS.'..'.DS.'mod_virtuemart_magiczoomplus.php');
                    
64                JFile::move($to . DS . 'mod_virtuemart_magiczoomplus_10.xml', $to . DS.'..'.DS.'mod_virtuemart_magiczoomplus.xml');
                    
73            $css = $to . DS . 'core' . DS . 'magiczoomplus.css';
                    
74            $c = file_get_contents($css);
                    
75            $url = preg_replace('/https?:\/\/[^\/]+\//is', '/', $url);
                    
94                    $mz_modDstPath,
                    
95                    $mz_modDstPath.DS.'..'.DS.'mod_virtuemart_magiczoomplus.php',
                    
96                    $mz_modDstPath.DS.'..'.DS.'mod_virtuemart_magiczoomplus.xml',
                    
                
File.php https://github.com/gustavor/lore.git | PHP | 506 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)
                    
152		if ($bytes === false && $this->lock === null) {
                    
153			return file_get_contents($this->path);
                    
154		}
                    
                
index.php https://gitlab.com/Ltaimao/wecenter | PHP | 422 lines
                    
18
                    
19if (file_exists(AWS_PATH . 'config/install.lock.php'))
                    
20{
                    
20{
                    
21	H::redirect_msg(load_class('core_lang')->_t('您的程序已经安装, 要重新安装请删除 system/config/install.lock.php'));
                    
22}
                    
33
                    
34		if (version_compare(PHP_VERSION, ENVIRONMENT_PHP_VERSION, '>=') AND get_cfg_var('safe_mode') == false)
                    
35		{
                    
113
                    
114		$base_dir = str_replace("\\", "",dirname(dirname($_SERVER['PHP_SELF'])));
                    
115
                    
410		{
                    
411			$config_file = file_get_contents(AWS_PATH . 'config.dist.php');
                    
412			$config_file = str_replace('{G_COOKIE_PREFIX}', fetch_salt(3) . '_', $config_file);
                    
                
MySqlTest.php https://bitbucket.org/d1rk/lithium.git | PHP | 258 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
5 * @copyright     Copyright 2012, Union of RAD (http://union-of-rad.org)
                    
6 * @license       http://opensource.org/licenses/bsd-license.php The BSD License
                    
7 */
                    
37		$sqlFile = $lithium . '/tests/mocks/data/source/database/adapter/mysql_companies.sql';
                    
38		$sql = file_get_contents($sqlFile);
                    
39		$this->db->read($sql, array('return' => 'resource'));
                    
                
class-wc-stripe-apple-pay-registration.php https://gitlab.com/campus-academy/krowkaramel | PHP | 417 lines
                    
1<?php
                    
2/**
                    
125		// Contents of domain association file from plugin dir.
                    
126		$new_contents = @file_get_contents( WC_STRIPE_PLUGIN_PATH . '/' . self::DOMAIN_ASSOCIATION_FILE_NAME ); // @codingStandardsIgnoreLine
                    
127		// Get file contents from local path and remote URL and check if either of which matches.
                    
128		$fullpath        = untrailingslashit( ABSPATH ) . '/' . self::DOMAIN_ASSOCIATION_FILE_DIR . '/' . self::DOMAIN_ASSOCIATION_FILE_NAME;
                    
129		$local_contents  = @file_get_contents( $fullpath ); // @codingStandardsIgnoreLine
                    
130		$url             = get_site_url() . '/' . self::DOMAIN_ASSOCIATION_FILE_DIR . '/' . self::DOMAIN_ASSOCIATION_FILE_NAME;
                    
187		$regex    = '^\\' . self::DOMAIN_ASSOCIATION_FILE_DIR . '\/' . self::DOMAIN_ASSOCIATION_FILE_NAME . '$';
                    
188		$redirect = 'index.php?' . self::DOMAIN_ASSOCIATION_FILE_NAME . '=1';
                    
189
                    
218		header( 'Content-Type: text/plain;charset=utf-8' );
                    
219		echo esc_html( file_get_contents( $path ) );
                    
220		exit;
                    
398			esc_html__( 'Please check the %1$slogs%2$s for more details on this issue. Logging must be enabled to see recorded logs.', 'woocommerce-gateway-stripe' ),
                    
399			'<a href="' . admin_url( 'admin.php?page=wc-status&tab=logs' ) . '">',
                    
400			'</a>'
                    
                
ConfigForm.php https://github.com/mihalyf/gallery3-contrib.git | PHP | 368 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2
                    
61    public static function getCSS() {
                    
62        return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css');
                    
63    }
                    
68    public static function getJavaScript() {
                    
69        return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js');
                    
70    }
                    
265                case HTMLPurifier_VarParser::ALIST:
                    
266                    $value = implode(PHP_EOL, $value);
                    
267                    break;
                    
270                    foreach ($value as $i => $v) {
                    
271                        $nvalue .= "$i:$v" . PHP_EOL;
                    
272                    }
                    
                
WireUpload.php https://bitbucket.org/webbear/processwire-base-installation.git | PHP | 409 lines
                    
1<?php
                    
2
                    
30	protected $validExtensions = array(); 
                    
31	protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh'); 
                    
32	protected $errors = array();
                    
42			UPLOAD_ERR_OK => $this->_('Successful Upload'),
                    
43			UPLOAD_ERR_INI_SIZE => $this->_('The uploaded file exceeds the upload_max_filesize directive in php.ini.'),
                    
44			UPLOAD_ERR_FORM_SIZE => $this->_('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.'),
                    
77
                    
78		$f = $this->getPhpFiles();
                    
79		if(!$f) return $files;
                    
107	/**
                    
108	 * Returns PHP's $_FILES or one constructed from an ajax upload
                    
109	 *
                    
130		$tmpName = tempnam($dir, get_class($this));
                    
131		file_put_contents($tmpName, file_get_contents('php://input')); 
                    
132		$filesize = is_file($tmpName) ? filesize($tmpName) : 0;
                    
                
class-wp-filesystem-ssh2.php https://github.com/muskmelon/Greemo.git | PHP | 383 lines
                    
1<?php
                    
2/**
                    
11 *
                    
12 * To use this class you must follow these steps for PHP 5.2.6+
                    
13 *
                    
13 *
                    
14 * @contrib http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes
                    
15 *
                    
15 *
                    
16 * Complie libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now, But many users have found the latest versions work)
                    
17 *
                    
28 *
                    
29 * Copy the ssh.so file it creates to your PHP Module Directory.
                    
30 * Open up your PHP.INI file and look for where extensions are placed.
                    
60		if ( !function_exists('stream_get_contents') ) {
                    
61			$this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function <code>stream_get_contents()</code>'));
                    
62			return false;
                    
                
Abstract.php https://github.com/manhhoangxuan/DTUI_201105.git | PHP | 635 lines
                    
1<?php
                    
2
                    
60	/**
                    
61	 * PHP errors generated during template evaluation.
                    
62	 *
                    
205			{
                    
206				$templateCode = file_get_contents($__template);
                    
207			}
                    
                
Form_bu.php https://gitlab.com/vanthanhhoh/devlovebook | PHP | 382 lines
                    
284			$options = '<?php foreach($Field[\'Options\'] as $Options):?>
                    
285			<option value="<?php echo $Options[\'value\'] ?>"<?php if($Options[\'value\'] == $Field[\'Value\']): ?> selected="selected"<?php endif ?>><?php echo $Options[\'text\'] ?></option>
                    
286			<?php endforeach ?>';
                    
306			$options = '<?php $ArrValue = explode(\',\',$Field[\'Value\']); foreach($Field[\'Options\'] as $Options):?>
                    
307			<option value="<?php echo $Options[\'value\'] ?>"<?php if(in_array($Options[\'value\'],$ArrValue)): ?> selected="selected"<?php endif ?>><?php echo $Options[\'text\'] ?></option>
                    
308			<?php endforeach ?>';
                    
330			<label for="ID_<?php echo $Field[\'Name\'] ?>_<?php echo $Options[\'value\'] ?>">
                    
331				<input type="radio" name="<?php echo $Field[\'Name\'] ?>" id="ID_<?php echo $Field[\'Name\'] ?>_<?php echo $Options[\'value\'] ?>" class="<?php echo $Field[\'Class\'] ?>" value="<?php echo $Options[\'value\'] ?>"<?php if($Options[\'value\'] == $Field[\'Value\']): ?> checked="checked"<?php endif ?>/>
                    
332				<?php echo $Options[\'text\'] ?>
                    
339				$options[] = '<label for="ID_' . $this->Element['Name'] . '_' . $Opt['value'] . '">
                    
340				<input type="radio" name="' . $this->Element['Name'] . '" id="ID_' . $this->Element['Name'] . '_' . $Opt['value'] . '" class="' . $this->Element['Class'] . '" value="' . $Opt['value'] . '"<?php if(\'' . $Opt['value'] . '\' == $Field[\'Value\']): ?> checked="checked"<?php endif ?>/>' . $Opt['text'] . '</label>';
                    
341			}
                    
356			<label for="ID_<?php echo $Field[\'Name\'] ?>_<?php echo $Options[\'value\'] ?>">
                    
357				<input type="checkbox" name="<?php echo $Field[\'Name\'] ?>[]" id="ID_<?php echo $Field[\'Name\'] ?>_<?php echo $Options[\'value\'] ?>" class="<?php echo $Field[\'Class\'] ?>" value="<?php echo $Options[\'value\'] ?>"<?php if(in_array($Options[\'value\'],$ArrValue)): ?> checked="checked"<?php endif ?>/>
                    
358				<?php echo $Options[\'text\'] ?>
                    
                
Minify.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 435 lines
                    
1<?php
                    
2
                    
167        if ($this->canImportFile($data)) {
                    
168            $data = file_get_contents($data);
                    
169
                    
330    {
                    
331        // PHP only supports $this inside anonymous functions since 5.4
                    
332        $minifier = $this;
                    
359         * * multiply all of that times 4, to account for the escaping that has
                    
360         * to be done to pass the backslash into the PHP string without it being
                    
361         * considered as escape-char (times 2) and to get it in the regex,
                    
398    {
                    
399        return strlen($path) < PHP_MAXPATHLEN && @is_file($path) && is_readable($path);
                    
400    }
                    
413        if (($handler = @fopen($path, 'w')) === false) {
                    
414            throw new IOException('The file "'.$path.'" could not be opened for writing. Check if PHP has enough permissions.');
                    
415        }
                    
                
file_helper.php https://gitlab.com/lisit1003/TTPHPServer | PHP | 479 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
47
                    
48		if (function_exists('file_get_contents'))
                    
49		{
                    
49		{
                    
50			return file_get_contents($file);
                    
51		}
                    
240
                    
241			// foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
242			while (FALSE !== ($file = readdir($fp)))
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
                
Profile.php https://github.com/grandison/budo16.git | PHP | 242 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Profile.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
21 */
                    
25 */
                    
26// require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';
                    
27
                    
30 */
                    
31// require_once 'Zend/Tool/Project/Profile/Resource/Container.php';
                    
32
                    
89    {
                    
90        // require_once 'Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php';
                    
91
                    
105        if (!isset($this->_attributes['profileData'])) {
                    
106            // require_once 'Zend/Tool/Project/Exception.php';
                    
107            throw new Zend_Tool_Project_Exception('loadFromData() must have "profileData" set.');
                    
                
Cache.php https://github.com/cawago/ci_campusync_auth.git | PHP | 416 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: Cache.php 5798 2009-06-02 15:10:46Z piccoloprincipe $
                    
4 *
                    
18 * and is licensed under the LGPL. For more information, see
                    
19 * <http://www.phpdoctrine.org>.
                    
20 */
                    
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
                    
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
29 * @link        www.phpdoctrine.org
                    
266        if ($this->_options['statsFile'] !== false) {
                    
267            $content = file_get_contents($this->_options['statsFile']);
                    
268
                    
                
Deployer.php https://gitlab.com/ilyales/vigma | PHP | 497 lines
                    
1<?php
                    
2
                    
209		}
                    
210		$content = gzinflate(file_get_contents($tempFile));
                    
211		$res = [];
                    
360		$full = $this->localDir . str_replace('/', DIRECTORY_SEPARATOR, $file);
                    
361		$content = file_get_contents($full);
                    
362		foreach ($this->filters[$ext] as $info) {
                    
363			if ($info['cached'] && is_file($tempFile = $this->tempDir . '/' . md5($content))) {
                    
364				$content = file_get_contents($tempFile);
                    
365			} else {
                    
434		} else {
                    
435			$s = file_get_contents($file);
                    
436			if (preg_match('#^[\x09\x0A\x0D\x20-\x7E\x80-\xFF]*+\z#', $s)) {
                    
                
team.php https://bitbucket.org/jorgenio/boca.git | PHP | 191 lines
                    
1<?php
                    
2////////////////////////////////////////////////////////////////////////////////
                    
18// Last modified 21/jul/2012 by cassio@ime.usp.br
                    
19require('header.php');
                    
20
                    
24		if(($ct = DBContestInfo($_SESSION["usertable"]["contestnumber"])) == null)
                    
25			ForceLoad("../index.php");
                    
26
                    
42			IntrusionNotify("file upload problem.");
                    
43			ForceLoad("../index.php");
                    
44		}
                    
57					   'filepath'=>$temp);
                    
58		if($runteam=='team.php') $param['allowneg']=1;
                    
59		DBNewRun ($param);
                    
68$runtmp = $_SESSION["locr"] . $ds . "private" . $ds . "runtmp" . $ds . "run-contest" . $_SESSION["usertable"]["contestnumber"] . 
                    
69	"-site". $_SESSION["usertable"]["usersitenumber"] . "-user" . $_SESSION["usertable"]["usernumber"] . ".php";
                    
70$redo = TRUE;
                    
                
PhotosAlbumEntryTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 364 lines
                    
1<?php
                    
2/**
                    
22
                    
23require_once 'Zend/Gdata/Photos.php';
                    
24require_once 'Zend/Gdata/Photos/AlbumEntry.php';
                    
24require_once 'Zend/Gdata/Photos/AlbumEntry.php';
                    
25require_once 'Zend/Http/Client.php';
                    
26require_once 'Zend/Http/Client/Adapter/Test.php';
                    
36 */
                    
37class Zend_Gdata_Photos_PhotosAlbumEntryTest extends PHPUnit_Framework_TestCase
                    
38{
                    
46    {
                    
47        $albumEntryText = file_get_contents(
                    
48                '_files/TestAlbumEntry.xml',
                    
                
File.php https://github.com/grandison/budo16.git | PHP | 364 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHPUnit
                    
4 *
                    
37 * @category   Testing
                    
38 * @package    PHPUnit
                    
39 * @author     Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
40 * @copyright  2002-2010 Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
41 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
42 * @link       http://www.phpunit.de/
                    
49
                    
50require_once 'PHPUnit/Util/Filter.php';
                    
51
                    
51
                    
52PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
53
                    
                
NotificationsControllerTest.php https://gitlab.com/adrianovieira/cacic | PHP | 233 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Created by PhpStorm.
                    
4 * User: eduardo
                    
36        $this->ws_data_dir = $kernel->locateResource("@CacicWSBundle/Resources/data/fixtures/");
                    
37        $this->modifications = file_get_contents($this->ws_data_dir."modifications.json");
                    
38        $this->coleta_modifications = file_get_contents($this->ws_data_dir."coleta-modifications.json");
                    
                
theme.php https://gitlab.com/x33n/respond | PHP | 363 lines
                    
1<?php
                    
2
                    
31		            
                    
32		            	$theme_json = file_get_contents($config);
                    
33		            	
                    
184			if(file_exists($location)){
                    
185    			$content = file_get_contents($location);
                    
186    			
                    
297            $response->contentType = 'application/json';
                    
298            $response->body = file_get_contents($file);
                    
299
                    
                
unpack.php https://gitlab.com/milo-ft/osTicket | PHP | 270 lines
                    
1<?php
                    
2
                    
55        $bootstrap_php = $this->destination . '/bootstrap.php';
                    
56        $lines = explode("\n", file_get_contents($bootstrap_php));
                    
57        $include_path = preg_replace('://+:', '/', $include_path);
                    
75        }
                    
76        if (!file_put_contents($bootstrap_php, implode("\n", $lines)))
                    
77            die("Unable to configure location of INCLUDE_DIR in bootstrap.php\n");
                    
101
                    
102        if (!preg_match_all('/^([\w:,]+) (.+)$/mu', file_get_contents($path),
                    
103            $lines, PREG_PATTERN_ORDER)
                    
151     * exclude - (string | array<string>) patterns that will be matched
                    
152     *      using the PHP `fnmatch` function. If any file or folder matches,
                    
153     *      it will be excluded from the copy procedure. Omit or use false
                    
206        $pipes = array();
                    
207        $php = proc_open('php', array(
                    
208            0 => array('pipe', 'r'),
                    
                
import.php https://github.com/66ru/gpor-contrib.git | PHP | 399 lines
                    
1<?php 
                    
2define('DS', '/');
                    
28    {
                    
29        if (!is_file('config.php')) {
                    
30            echo "missing config.php";
                    
32        }
                    
33        $this->params = array_merge($this->params, include 'config.php');
                    
34
                    
59        $content = false;
                    
60        $result = @file_get_contents($url);
                    
61        if ($result) {
                    
86            $content = false;
                    
87            $result = @file_get_contents($url);
                    
88            if ($result) {
                    
112                if ($this->params['debug'])
                    
113                    echo 'Place "' . $place->title . '" disabled.' . PHP_EOL;
                    
114                continue;
                    
                
quotation_a5.blade.php https://gitlab.com/laher01/factu40 | PHP | 355 lines
                    
1@php
                    
2    $establishment = $document->establishment;
                    
6    $tittle = $document->prefix.'-'.str_pad($document->id, 8, '0', STR_PAD_LEFT);
                    
7@endphp
                    
8<html>
                    
18                <div class="company_logo_box">
                    
19                    <img src="data:{{mime_content_type(public_path("storage/uploads/logos/{$company->logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo" style="max-width: 150px;">
                    
20                </div>
                    
244                @if($row->discounts)
                    
245                    @php
                    
246                        $total_discount_line = 0;
                    
249                        }
                    
250                    @endphp
                    
251                    {{ number_format($total_discount_line, 2) }}
                    
340    <strong>PAGOS:</strong> </td></tr>
                    
341        @php
                    
342            $payment = 0;
                    
                
tokenizer.php https://bitbucket.org/crevillo/enetcall.git | PHP | 293 lines
                    
1<?php
                    
2/**
                    
152
                    
153        return $this->tokenizeString( file_get_contents( $file ) );
                    
154    }
                    
                
CmsCompoundObjectTest.php https://gitlab.com/gideonmarked/wellmarketing | PHP | 259 lines
                    
1<?php
                    
2
                    
99        $this->assertFileExists($srcPath);
                    
100        $testContent = file_get_contents($srcPath);
                    
101        $this->assertNotEmpty($testContent);
                    
249   {
                    
250        $expected = file_get_contents($expected);
                    
251        $expected = preg_replace('~\R~u', PHP_EOL, $expected); // Normalize EOL
                    
252
                    
253        $actual = file_get_contents($actual);
                    
254        $actual = preg_replace('~\R~u', PHP_EOL, $actual); // Normalize EOL
                    
                
ext_url.cpp https://github.com/tstarling/hiphop-php.git | C++ | 370 lines
                    
308
                    
309const StaticString s_PHP_URL_SCHEME("PHP_URL_SCHEME");
                    
310const StaticString s_PHP_URL_HOST("PHP_URL_HOST");
                    
342    Native::registerConstant<KindOfInt64>(
                    
343      s_PHP_URL_QUERY.get(), k_PHP_URL_QUERY
                    
344    );
                    
345    Native::registerConstant<KindOfInt64>(
                    
346      s_PHP_URL_FRAGMENT.get(), k_PHP_URL_FRAGMENT
                    
347    );
                    
348    Native::registerConstant<KindOfInt64>(
                    
349      s_PHP_QUERY_RFC1738.get(), k_PHP_QUERY_RFC1738
                    
350    );
                    
351    Native::registerConstant<KindOfInt64>(
                    
352      s_PHP_QUERY_RFC3986.get(), k_PHP_QUERY_RFC3986
                    
353    );
                    
                
Config.php https://gitlab.com/alexandresgv/siteentec | PHP | 383 lines
                    
1<?php
                    
2/**
                    
68    {
                    
69        $configFile = file_get_contents($configFilePath);
                    
70        $configArray = Yaml::parse($configFile);
                    
89    {
                    
90        $configArray = json_decode(file_get_contents($configFilePath), true);
                    
91        if (!is_array($configArray)) {
                    
100    /**
                    
101     * Create a new instance of the config class using a PHP file path.
                    
102     *
                    
102     *
                    
103     * @param  string $configFilePath Path to the PHP File
                    
104     * @throws \RuntimeException
                    
106     */
                    
107    public static function fromPhp($configFilePath)
                    
108    {
                    
                
 

Source

Language