PageRenderTime 313ms queryTime 46ms sortTime 15ms getByIdsTime 70ms findMatchingLines 117ms

100+ results results for 'php realpath' (313 ms)

Not the results you expected?
class.dbquery.php https://gitlab.com/zohaibsaleem/shipcliq | PHP | 171 lines
                    
1<?php //003ab
                    
2if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
                    
3?>
                    
                
Test.php https://github.com/EHER/phpunit-all-in-one.git | PHP | 372 lines
                    
36 *
                    
37 * @package    PHPUnit
                    
38 * @subpackage SkeletonGenerator
                    
38 * @subpackage SkeletonGenerator
                    
39 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
40 * @copyright  2012 Sebastian Bergmann <sebastian@phpunit.de>
                    
41 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
                    
42 * @link       http://www.phpunit.de/
                    
43 * @since      File available since Release 1.0.0
                    
50 * @subpackage SkeletonGenerator
                    
51 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
52 * @copyright  2012 Sebastian Bergmann <sebastian@phpunit.de>
                    
57 */
                    
58class PHPUnit_SkeletonGenerator_Test extends PHPUnit_SkeletonGenerator
                    
59{
                    
                
CAssetManager.php https://bitbucket.org/krvital/task.git | PHP | 334 lines
                    
1<?php
                    
2/**
                    
46	 * In particular, symbolic links are supported only on Linux/Unix, and Windows Vista/2008 or greater.
                    
47	 * The latter requires PHP 5.3 or greater.
                    
48	 *
                    
71	 * @var integer the permission to be set for newly generated asset files.
                    
72	 * This value will be used by PHP chmod function.
                    
73	 * Defaults to 0666, meaning the file is read-writable by all users.
                    
78	 * @var integer the permission to be set for newly generated asset directories.
                    
79	 * This value will be used by PHP chmod function.
                    
80	 * Defaults to 0777, meaning the directory can be read, written and executed by all users.
                    
134	{
                    
135		if(($basePath=realpath($value))!==false && is_dir($basePath) && is_writable($basePath))
                    
136			$this->_basePath=$basePath;
                    
213			return $this->_published[$path];
                    
214		elseif(($src=realpath($path))!==false)
                    
215		{
                    
                
shell.test.php https://github.com/markusbegiebing/cakephp.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)
                    
373
                    
374		// Shell::shortPath needs Folder::realpath
                    
375		// $path = DS . 'tmp' . DS . 'ab' . DS . '..' . DS . 'cd';
                    
409		$path = TMP . 'shell_test';
                    
410		$file = $path . DS . 'file1.php';
                    
411
                    
                
shp.php https://bitbucket.org/pavolve/masterskayaludmila.git | PHP | 426 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * ESRI Shape file import plugin for phpMyAdmin
                    
4 *
                    
4 *
                    
5 * @package PhpMyAdmin-Import
                    
6 * @subpackage ESRI_Shape
                    
7 */
                    
8if (! defined('PHPMYADMIN')) {
                    
9    exit;
                    
33    set_include_path(get_include_path() . PATH_SEPARATOR . getcwd() . '/libraries/bfShapeFiles/');
                    
34    include_once './libraries/bfShapeFiles/ShapeFile.lib.php';
                    
35
                    
58    /**
                    
59     * This class extends ShapeFile class to cater the following phpMyAdmin
                    
60     * specific requirements.
                    
                
mkdist.php https://bitbucket.org/luobailiang/php-src.git | PHP | 548 lines
                    
16$dist_dir = $build_dir . "/php-" . phpversion();
                    
17$test_dir = $build_dir . "/php-test-pack-" . phpversion();
                    
18$pecl_dir = $build_dir . "/pecl-" . phpversion();
                    
241	"win32/pws-php5cgi.reg" => "pws-php5cgi.reg",
                    
242	"win32/pws-php5isapi.reg" => "pws-php5isapi.reg",
                    
243);
                    
250$general_files = array(
                    
251	"php.gif"			=>	"php.gif",
                    
252);
                    
474	echo "Downloading go-pear\n";
                    
475	copy("http://pear.php.net/go-pear", "$dist_dir/PEAR/go-pear.php");
                    
476
                    
495
                    
496	/* Now, we want PEAR.php, Getopt.php (Console_Getopt) and Tar.php (Archive_Tar)
                    
497	 * broken out of the tarballs */
                    
                
File.php https://gitlab.com/devtoannh/cafe | PHP | 468 lines
                    
25 */
                    
26require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
86        if ($fileName == '') {
                    
87            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
209            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
210            throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');
                    
211        }
                    
293            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
294            throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class');
                    
295        }
                    
460        if ($this->_filename == '' || !is_writable(dirname($this->_filename))) {
                    
461            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
462            throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');
                    
                
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)
                    
372
                    
373		// Shell::shortPath needs Folder::realpath
                    
374		// $path = DS . 'tmp' . DS . 'ab' . DS . '..' . DS . 'cd';
                    
408		$path = TMP . 'shell_test';
                    
409		$file = $path . DS . 'file1.php';
                    
410
                    
                
include_require_php.ml https://github.com/Tener/pfff.git | OCaml | 458 lines
                    
50   | ConcatConstant of Ast_php.name * Common.filename
                    
51   (* e.g. require $_SERVER['PHP_ROOT'].'/lib/init/ajax.php'; *)
                    
52   | ConcatArrrayVar of Ast_php.dname * string * Common.filename
                    
143
                    
144  (* ./ffi -dump_php_ml ../tests/require_realpath.php *)
                    
145  | (Binary(
                    
196
                    
197  (* ./ffi -dump_php_ml ../tests/require_realpath3.php *)
                    
198  | (Lv(
                    
224
                    
225  (* ./ffi -dump_php_ml ../tests/require_constant_concat.php *)
                    
226  | (Binary((Sc(C(CName(name))), t_3),
                    
232
                    
233  (* ./ffi -dump_php_ml ../tests/require_classic_bis2.php *)
                    
234  | (Sc(
                    
                
tsrm_virtual_cwd.h https://github.com/tstarling/hiphop-php.git | C Header | 339 lines
                    
135# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
                    
136# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
                    
137CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
                    
246CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
                    
247CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC);
                    
248CWD_API int realpath_cache_size(TSRMLS_D);
                    
249CWD_API int realpath_cache_max_buckets(TSRMLS_D);
                    
250CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
                    
251
                    
267#define VCWD_GETWD(buf)
                    
268#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
                    
269#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
                    
318
                    
319#define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path TSRMLS_CC)
                    
320
                    
                
paypal.php http://ymscorp.googlecode.com/svn/trunk/ | PHP | 168 lines
                    
1<?php //00d4b
                    
2// *************************************************************************
                    
33// *************************************************************************
                    
34if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
                    
35?>
                    
                
categories.php https://github.com/LisaX/oscommerce.git | PHP | 336 lines
                    
1<?php
                    
2/*
                    
173        if ( $error === false ) {
                    
174          $categories_image = new upload($data['image'], realpath('../' . DIR_WS_IMAGES . 'categories'));
                    
175
                    
282                  if ( $Qcheck->numberOfRows() === 0 ) {
                    
283                    if (file_exists(realpath('../' . DIR_WS_IMAGES . 'categories/' . $Qimage->value('categories_image')))) {
                    
284                      @unlink(realpath('../' . DIR_WS_IMAGES . 'categories/' . $Qimage->value('categories_image')));
                    
                
cli_install.php https://bitbucket.org/jojoluzifer/gold-light-project.git | PHP | 333 lines
                    
11//   cd install
                    
12//   php cli_install.php install --db_host localhost \
                    
13//                               --db_user root \
                    
28define('DIR_SYSTEM', str_replace('\'', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
                    
29define('DIR_OPENCART', str_replace('\'', '/', realpath(DIR_APPLICATION . '../')) . '/');
                    
30define('DIR_DATABASE', DIR_SYSTEM . 'database/');
                    
69                                  '--http_server', 'http://localhost/opencart'));
                    
70    echo 'php cli_install.php install ' . $options . "\n\n";
                    
71}
                    
138    if (phpversion() < '5.0') {
                    
139        $error = 'Warning: You need to use PHP5 or above for OpenCart to work!';
                    
140    }
                    
169
                    
170    if (!is_writable(DIR_OPENCART . 'config.php')) {
                    
171        $error = 'Warning: config.php needs to be writable for OpenCart to be installed!';
                    
                
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 *
                    
185				$_filedata = array();
                    
186				$source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
                    
187			}
                    
237				$_filedata = array();
                    
238				$source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
                    
239			}
                    
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
                    
                
ajax_calls.php https://gitlab.com/staging06/myproject | PHP | 253 lines
                    
2
                    
3include('config/config.php');
                    
4
                    
28        case 'image_size':
                    
29            if (realpath(dirname(_PS_ROOT_DIR_.$_POST['path'])) != realpath(_PS_ROOT_DIR_.$upload_dir)) {
                    
30                die();
                    
184			</div>
                    
185			<?php
                    
186            if (in_array(strtolower($info['extension']), $ext_music)) {
                    
196                ?>",
                    
197									mp3: "<?php echo Tools::safeOutput($preview_file);
                    
198                ?>",
                    
200                ?>",
                    
201									oga: "<?php echo Tools::safeOutput($preview_file);
                    
202                ?>",
                    
                
gantry.php https://gitlab.com/ricardosanchez/prueba | PHP | 453 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version   $Id: gantry.php 12533 2013-08-08 17:30:05Z btowles $
                    
4 * @author    RocketTheme http://www.rockettheme.com
                    
27
                    
28	require_once (realpath(dirname(__FILE__)) . '/core/gantryloader.class.php');
                    
29
                    
58		foreach ($url_file_checks as $url_file) {
                    
59			$full_path = realpath($url_file);
                    
60			if ($full_path !== false && file_exists($full_path)) {
                    
98		foreach ($url_file_checks as $url_file) {
                    
99			$full_path = realpath($url_file);
                    
100			if ($full_path !== false && file_exists($full_path)) {
                    
420		$stack = debug_backtrace();
                    
421		if ($stack[1]['file'] == realpath($gantry->templatePath . '/lib/gantry/gantry.php')) {
                    
422			return true;
                    
                
FileTransfer.php https://gitlab.com/geeta7/drupal | PHP | 422 lines
                    
1<?php
                    
2
                    
141   *
                    
142   * @see http://php.net/chmod
                    
143   */
                    
214    $full_jail = $this->chroot . $this->jail;
                    
215    $full_path = drupal_realpath(substr($this->chroot . $path, 0, strlen($full_jail)));
                    
216    $full_path = $this->fixRemotePath($full_path, FALSE);
                    
                
user-deletions.inc.php https://gitlab.com/Gashler/dp | PHP | 225 lines
                    
1<?php
                    
2/**
                    
16*/
                    
17if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
                    
18	exit ("Do not access this file directly.");
                    
54							{
                    
55								if (($s2says || (is_blog_admin () && $pagenow === "users.php")) && ($processed[$user_id] = true))
                    
56									// Do NOT react on this globally. There are many routines that remove Users for different/minor reasons.
                    
                
gallery.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 385 lines
                    
1<?php
                    
2
                    
55		if ( 'carousel' == $instance['link'] ) {
                    
56			require_once plugin_dir_path( realpath( dirname( __FILE__ ) . '/../carousel/jetpack-carousel.php' ) ) . 'jetpack-carousel.php';
                    
57
                    
198
                    
199		require_once plugin_dir_path( realpath( dirname( __FILE__ ) . '/../shortcodes/slideshow.php' ) ) . 'slideshow.php';
                    
200
                    
269
                    
270		include dirname( __FILE__ ) . '/gallery/templates/form.php';
                    
271	}
                    
362
                    
363		if ( 'widgets.php' == $pagenow ) {
                    
364			wp_enqueue_media();
                    
                
XmlFileLoaderTest.php https://github.com/thewiredman/symfony.git | PHP | 254 lines
                    
1<?php
                    
2
                    
21
                    
22class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
                    
23{
                    
27    {
                    
28        self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
                    
29        require_once self::$fixturesPath.'/includes/ProjectExtension.php';
                    
29        require_once self::$fixturesPath.'/includes/ProjectExtension.php';
                    
30        require_once self::$fixturesPath.'/includes/ProjectWithXsdExtension.php';
                    
31    }
                    
80
                    
81        $this->assertEquals($expected, $actual, '->load() converts XML values to PHP ones');
                    
82    }
                    
134        $this->assertEquals('getInstance', $services['constructor']->getFactoryMethod(), '->load() parses the factory-method attribute');
                    
135        $this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag');
                    
136        $this->assertEquals(array('foo', new Reference('foo'), array(true, false)), $services['arguments']->getArguments(), '->load() parses the argument tags');
                    
                
db.class.php https://bitbucket.org/frchico/chamilo_openshift.git | PHP | 395 lines
                    
1<?php
                    
2
                    
44        }
                    
45        require_once api_get_path(LIBRARY_PATH) . 'symfony/Doctrine/ORM/Tools/Setup.php';
                    
46        $directory = api_get_path(LIBRARY_PATH) . 'symfony';
                    
48        if (!class_exists('Doctrine\Common\ClassLoader', false)) {
                    
49            require_once $directory . '/doctrine/Common/ClassLoader.php';
                    
50        }
                    
162        $result = __DIR__ . '/../entity';
                    
163        $result = realpath($result);
                    
164        return $result;
                    
330        $generator->setBackupExisting(false);
                    
331        $generator->setExtension('.class.php');
                    
332        $generator->setNumSpaces(4);
                    
359//            $config = Setup::createXMLMetadataConfiguration($paths, $is_dev);
                    
360//        } else if ($ext == 'php') {
                    
361//            $config = Setup::createAnnotationMetadataConfiguration($paths, $is_dev);
                    
                
FileEngine.php https://bitbucket.org/ManiAdil/jardinorient.git | PHP | 373 lines
                    
1<?php
                    
2/**
                    
8 *
                    
9 * PHP 5
                    
10 *
                    
10 *
                    
11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
12 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
18 * @link          http://cakephp.org CakePHP(tm) Project
                    
19 * @since         CakePHP(tm) v 1.2.0.4933
                    
19 * @since         CakePHP(tm) v 1.2.0.4933
                    
20 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
21 */
                    
209		}
                    
210		$path = $this->_File->getRealPath();
                    
211		$this->_File = null;
                    
                
XsdTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 302 lines
                    
1<?php
                    
2/**
                    
9
                    
10class XsdTest extends \PHPUnit_Framework_TestCase
                    
11{
                    
24        $urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
                    
25        self::$_schemaPath = $urnResolver->getRealPath('urn:magento:module:Magento_Sales:etc/pdf.xsd');
                    
26        self::$_schemaFilePath = $urnResolver->getRealPath('urn:magento:module:Magento_Sales:etc/pdf_file.xsd');
                    
122     * @return array
                    
123     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
                    
124     */
                    
                
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;
                    
                
makeXMLForOneService.php https://gitlab.com/florianocomercial/centreon | PHP | 287 lines
                    
1<?php
                    
2/*
                    
38 */
                    
39require_once realpath(dirname(__FILE__) . "/../../../../../../config/centreon.config.php");
                    
40
                    
40
                    
41include_once $centreon_path . "www/class/centreonUtils.class.php";
                    
42
                    
45 */
                    
46include_once _CENTREON_PATH_ . "www/class/centreonXMLBGRequest.class.php";
                    
47include_once _CENTREON_PATH_ . "www/class/centreonLang.class.php";
                    
                
PhpDumperTest.php https://gitlab.com/Isaki/le331.fr | PHP | 221 lines
                    
32
                    
33        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
                    
34        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1-1.php', $dumper->dump(array('class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump')), '->dump() takes a class and a base_class options');
                    
64        $dumper = new PhpDumper($container);
                    
65        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services10.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
                    
66    }
                    
99        $dumper = new PhpDumper($container);
                    
100        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services8.php', $dumper->dump(), '->dump() dumps parameters');
                    
101    }
                    
141
                    
142        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services19.php', $dumper->dump(), '->dump() dumps services with anonymous factories');
                    
143    }
                    
184    {
                    
185        require_once self::$fixturesPath.'/php/services9.php';
                    
186        require_once self::$fixturesPath.'/includes/foo.php';
                    
                
Auth.php https://gitlab.com/iarafat/yellow-php-user-management-system | PHP | 411 lines
                    
123
                    
124		// PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]
                    
125		if (!function_exists('curl_init')) {
                    
129
                    
130		// PHP JSON extension [http://php.net/manual/en/book.json.php]
                    
131		if (!function_exists('json_decode')) {
                    
137		if (session_name() != "PHPSESSID") {
                    
138			Hybrid_Logger::info('PHP session.name diff from default PHPSESSID. http://php.net/manual/en/session.configuration.php#ini.session.name.');
                    
139		}
                    
164			// try to provide the previous if any
                    
165			// Exception::getPrevious (PHP 5 >= 5.3.0) http://php.net/manual/en/exception.getprevious.php
                    
166			if (version_compare(PHP_VERSION, '5.3.0', '>=') && ($p instanceof Exception)) {
                    
357		// Ensure session is saved before sending response, see https://github.com/symfony/symfony/pull/12341
                    
358		if ((PHP_VERSION_ID >= 50400 && PHP_SESSION_ACTIVE === session_status()) || (PHP_VERSION_ID < 50400 && isset($_SESSION) && session_id())) {
                    
359			session_write_close();
                    
                
PhpDumperTest.php https://gitlab.com/pr0055/symfonypizza | PHP | 298 lines
                    
34
                    
35        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
                    
36        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services1-1.php', $dumper->dump(array('class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump')), '->dump() takes a class and a base_class options');
                    
66        $dumper = new PhpDumper($container);
                    
67        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services10.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
                    
68    }
                    
112        $dumper = new PhpDumper($container);
                    
113        $this->assertStringEqualsFile(self::$fixturesPath.'/php/services8.php', $dumper->dump(), '->dump() dumps parameters');
                    
114    }
                    
254    {
                    
255        require_once self::$fixturesPath.'/php/services9.php';
                    
256        require_once self::$fixturesPath.'/includes/foo.php';
                    
284
                    
285        $this->assertEquals(file_get_contents(self::$fixturesPath.'/php/services24.php'), $dumper->dump());
                    
286    }
                    
                
configure.php https://github.com/v2ninad/nm_cake.git | PHP | 401 lines
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://cakephp.org CakePHP(tm) Project
                    
15 * @package       cake.libs
                    
72			if (!include(CONFIGS . 'core.php')) {
                    
73				trigger_error(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
                    
74			}
                    
85				if (!empty($cache['settings']['path'])) {
                    
86					$path = realpath($cache['settings']['path']);
                    
87				} else {
                    
114			if (!include(CONFIGS . 'bootstrap.php')) {
                    
115				trigger_error(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
                    
116			}
                    
                
File.php https://github.com/grandison/budo16.git | PHP | 465 lines
                    
25 */
                    
26// require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
86        if ($fileName == '') {
                    
87            // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
209            // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
210            throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');
                    
211        }
                    
293            // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
294            throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class');
                    
295        }
                    
457        if ($this->_filename == '' || !is_writable(dirname($this->_filename))) {
                    
458            // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
459            throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');
                    
                
AdWordsUser.php https://github.com/markvince/CakePHP-GAStats-Plugin.git | PHP | 410 lines
                    
1<?php
                    
2/**
                    
5 *
                    
6 * PHP version 5
                    
7 *
                    
29 */
                    
30require_once dirname(__FILE__) . '/../../Common/Lib/AdsUser.php';
                    
31require_once dirname(__FILE__) . '/../../Common/Util/ApiPropertiesUtils.php';
                    
31require_once dirname(__FILE__) . '/../../Common/Util/ApiPropertiesUtils.php';
                    
32require_once 'AdWordsSoapClientFactory.php';
                    
33require_once 'AdWordsConstants.php';
                    
114    $authenticationIni =
                    
115        parse_ini_file(realpath($authenticationIniPath), true);
                    
116
                    
                
tiny_mce_gzip.php https://github.com/KenBoyer/CompactCMS.git | PHP | 332 lines
                    
1<?php
                    
2
                    
6/**
                    
7 * tiny_mce_gzip.php
                    
8 *
                    
23	 * 	"languages" => "en",
                    
24	 *  "cache_dir" => realpath(dirname(__FILE__) . "/../../_cache"),
                    
25	 *  "files"     => "somescript,anotherscript",
                    
39 * Example of direct usage:
                    
40 * require_once("../tiny_mce_gzip.php");
                    
41 *
                    
43 * TinyMCE_Compressor::renderTag(array(
                    
44 *    "url" => "../tiny_mce_gzip.php",
                    
45 *    "plugins" => "pagebreak,style",
                    
                
Compass.php https://github.com/vivid-planet/library.git | PHP | 511 lines
                    
1<?php
                    
2require_once dirname(__FILE__) . '/../ExtensionInterface.php';
                    
140        }
                    
141        if (!$path = realpath($file)) {
                    
142            $path = SassScriptFunction::$context->node->token->filename;
                    
149            }
                    
150            $path = realpath($path);
                    
151        }
                    
484        if ($web_path) {
                    
485            $webroot = realpath($_SERVER['DOCUMENT_ROOT']);
                    
486            $path = str_replace($webroot, '', $path);
                    
                
ImagesController.php https://gitlab.com/jensdwul1/nmdad3.local | PHP | 362 lines
                    
1<?php
                    
2
                    
223        $uploadDirectory = 'uploads';
                    
224        $fileName = sha1_file($file->getRealPath()).'.'.$file->guessExtension();
                    
225        $fileLocator = realpath($this->getParameter('kernel.root_dir').DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web').DIRECTORY_SEPARATOR.$uploadDirectory;
                    
                
test_generateLotsVisitsWebsites.php https://github.com/quarkness/piwik.git | PHP | 135 lines
                    
1<?php
                    
2define('PIWIK_INCLUDE_PATH', realpath( dirname(__FILE__)."/.." ));
                    
5define('PIWIK_ENABLE_SESSION_START', false);
                    
6require_once PIWIK_INCLUDE_PATH . "/index.php";
                    
7require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php";
                    
7require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php";
                    
8require_once PIWIK_INCLUDE_PATH . "/libs/PiwikTracker/PiwikTracker.php";
                    
9
                    
11
                    
12if(!Piwik_Common::isPhpCliMode()) { die("ERROR: Must be executed in CLI"); }
                    
13
                    
                
ClassLoader.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 412 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version   $Id: ClassLoader.php 57540 2012-10-14 18:27:59Z btowles $
                    
4 * @author    RocketTheme http://www.rockettheme.com
                    
9 * SplClassLoader implementation that implements the technical interoperability
                    
10 * standards for PHP 5.3 namespaces and class names.
                    
11 *
                    
11 *
                    
12 * http://groups.google.com/group/php-standards/web/final-proposal
                    
13 *
                    
36		 */
                    
37		const FILE_EXTENSION = '.php';
                    
38		/**
                    
102			if (stripos($className, 'RokCommon') === 0) {
                    
103				$commonsPath    = realpath(dirname(__FILE__) . '/..');
                    
104				$fileName       = str_replace('_', DIRECTORY_SEPARATOR, $className) . ".php";
                    
                
AbstractIntegrationTest.php https://gitlab.com/I-NOZex/quiz | PHP | 331 lines
                    
35 * --REQUIREMENTS--
                    
36 * php=5.4**
                    
37 * hhvm=false***
                    
43 *     * Additional fixers may be omitted.
                    
44 *    ** PHP minimum version. Default to current running php version (no effect).
                    
45 *   *** HHVM compliant flag. Default to true. Set to false to skip test under HHVM.
                    
53 */
                    
54abstract class AbstractIntegrationTest extends \PHPUnit_Framework_TestCase
                    
55{
                    
154        }
                    
155        if (isset($requirements['php']) && version_compare(PHP_VERSION, $requirements['php']) < 0) {
                    
156            $this->markTestSkipped(sprintf('PHP %s (or later) is required.', $requirements['php']));
                    
296    {
                    
297        $requirements = array('hhvm' => true, 'php' => PHP_VERSION);
                    
298
                    
                
FinderTest.php https://github.com/Exercise/symfony.git | PHP | 333 lines
                    
65        $this->assertSame($finder, $finder->depth('<= 0'));
                    
66        $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
                    
67
                    
132        $this->assertSame($finder, $finder->ignoreVCS(false));
                    
133        $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
                    
134
                    
189        $finder = new Finder();
                    
190        $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }));
                    
191        $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
                    
222        $finder = new Finder();
                    
223        $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
                    
224
                    
224
                    
225        $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);
                    
226    }
                    
                
Test.php https://github.com/samar-tmr/MyVenture.git | PHP | 377 lines
                    
2/**
                    
3 * PHPUnit
                    
4 *
                    
39 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
40 * @copyright  2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
                    
41 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
51 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
52 * @copyright  2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
                    
53 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
54 * @version    Release: @package_version@
                    
55 * @link       http://www.phpunit.de/
                    
56 * @since      Class available since Release 3.3.0
                    
57 */
                    
58class PHPUnit_Util_Skeleton_Test extends PHPUnit_Util_Skeleton
                    
59{
                    
                
file.php https://github.com/mjphaynes/core.git | PHP | 355 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
                    
4 *
                    
9 * @copyright  2010 - 2011 Fuel Development Team
                    
10 * @link       http://fuelphp.com
                    
11 */
                    
326						// update the path, and add the trailing slash
                    
327						$item = realpath($item).'/';
                    
328					break;
                    
                
class-wp-image-editor.php https://gitlab.com/Gashler/dp | PHP | 403 lines
                    
1<?php
                    
2/**
                    
296
                    
297		if ( ! is_null( $dest_path ) && $_dest_path = realpath( $dest_path ) )
                    
298			$dir = $_dest_path;
                    
                
AddressBookUpgradeScript.class.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 220 lines
                    
1<?php
                    
2
                    
36    function execute() {
                    
37      define('ROOT', realpath(dirname(__FILE__) . '/../../../'));
                    
38      
                    
42      
                    
43      $config_is_set = require_once INSTALLATION_PATH . '/config/config.php';
                    
44      if (!$config_is_set) {
                    
                
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\'] ?>
                    
                
unpack.php https://gitlab.com/milo-ft/osTicket | PHP | 270 lines
                    
39    function realpath($path) {
                    
40        return ($p = realpath($path)) ? $p : $path;
                    
41    }
                    
54        # Read the main.inc.php script
                    
55        $bootstrap_php = $this->destination . '/bootstrap.php';
                    
56        $lines = explode("\n", file_get_contents($bootstrap_php));
                    
76        if (!file_put_contents($bootstrap_php, implode("\n", $lines)))
                    
77            die("Unable to configure location of INCLUDE_DIR in bootstrap.php\n");
                    
78    }
                    
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'),
                    
                
functions.inc.php https://bitbucket.org/vsposato/vivo-tools.git | PHP | 520 lines
                    
26 * PHP License, version 3.0 or later.  A copy of this license should have
                    
27 * been distributed with this file in the file LICENSE.PHP .  If this is not
                    
28 * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
                    
94  var_dump($mixed);
                    
95  if ( php_sapi_name() !== "cli")
                    
96    echo("</pre>");
                    
131    //drive: followed by a relative path would be a drive specific default folder.
                    
132    //not known in php app code, treat as abs path
                    
133    //($url[1] !== ':' || ($url[2]!=='\\' && $url[2]!=='/'))
                    
395 *
                    
396 * @see http://www.php.net/manual/en/function.set-error_handler.php
                    
397 *
                    
506 *
                    
507 * @link http://us.php.net/manual/en/function.sys-get-temp-dir.php#85261
                    
508 */
                    
                
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);
                    
151        /* PrestaShop */
                    
152        if (($_dir = realpath($smarty->getCacheDir())) === false)
                    
153            return 0;
                    
196            foreach ($_cache as $_file) {
                    
197				if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, 'index.php') !== false) {
                    
198                    continue;
                    
262    {
                    
263        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
264            clearstatcache(true, $cached->lock_id);
                    
                
util_rt.php https://gitlab.com/billyprice1/QuickBox | PHP | 439 lines
                    
1<?php
                    
2
                    
2
                    
3require_once( "../../php/xmlrpc.php" );
                    
4require_once( "../../php/Torrent.php" );
                    
33//------------------------------------------------------------------------------
                    
34function rtDaemon( $php, $script, $args )
                    
35{
                    
35{
                    
36	if( !$php || $php == '' ) $php = 'php';
                    
37	$params = escapeshellarg( $script ).' --daemon';
                    
39		$params .= ' '.escapeshellarg( $arg );
                    
40	exec( $php.' '.$params.' > /dev/null 2>/dev/null &', $out, $ret );
                    
41	exit( (int)$ret );
                    
211	// Check if source and destination directories are the same
                    
212	if( realpath( $src ) == realpath( $dst ) )
                    
213	{
                    
                
Version.php https://github.com/psycha/symfony-sandbox.git | PHP | 326 lines
                    
1<?php
                    
2/*
                    
30 *
                    
31 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
32 * @link        www.doctrine-project.org
                    
192        if (is_dir($path)) {
                    
193            $path = realpath($path);
                    
194            $path = $path . '/doctrine_migration_' . date('YmdHis') . '.sql';
                    
                
instance_factory.py https://github.com/jsa/gaesdk-python.git | Python | 297 lines
                    
69    if runtime == 'php55':
                    
70      php_binary_dir = 'php/php-5.5-Win32-VC11-x86'
                    
71  elif sys.platform == 'darwin':
                    
72    if runtime == 'php55':
                    
73      php_binary_dir = '../php55'
                    
74
                    
130  @classmethod
                    
131  def _check_php_version(cls, php_executable_path, env):
                    
132    """Check if php-cgi has the correct version."""
                    
212    if not os.path.exists(php_executable_path):
                    
213      raise _PHPBinaryError('The path specified with the --php_executable_path '
                    
214                            'flag (%s) does not exist.' % php_executable_path)
                    
216    if not os.access(php_executable_path, os.X_OK):
                    
217      raise _PHPBinaryError('The path specified with the --php_executable_path '
                    
218                            'flag (%s) is not executable' % php_executable_path)
                    
                
File.php https://bitbucket.org/netglue/zf-1.12-release.git | PHP | 468 lines
                    
30 */
                    
31require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
109    {
                    
110        $realpath = realpath($filePath);
                    
111
                    
112        if ($realpath === false) {
                    
113            if ( ($realpath = Zend_Reflection_File::findRealpathInIncludePath($filePath)) === false) {
                    
114                require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
                
NodeImportTestCase.php https://github.com/arielalvarez88/yaquemotors.git | PHP | 284 lines
                    
1<?php
                    
2
                    
123
                    
124    $this->drupalPost(NULL, array('files[file_upload]' => realpath($data['file'])), t('Upload file'));
                    
125    $title = t('New file uploaded');
                    
212   * @param $group
                    
213   *   The type of assertion - examples are "Browser", "PHP".
                    
214   *
                    
231   * @param $group
                    
232   *   The type of assertion - examples are "Browser", "PHP".
                    
233   *
                    
250   * @param $group
                    
251   *   The type of assertion - examples are "Browser", "PHP".
                    
252   *
                    
269   * @param $group
                    
270   *   The type of assertion - examples are "Browser", "PHP".
                    
271   *
                    
                
ezwebdavfileserver.php https://github.com/Yannix/ezpublish.git | PHP | 448 lines
                    
184        // Get the dir's creation & modification times.
                    
185        $fileInfo["ctime"] = filectime( $realPath.'/.' );
                    
186        $fileInfo["mtime"] = filemtime( $realPath.'/.' );
                    
232
                    
233        append_to_log( "HEAD: realPath is $realPath");
                    
234
                    
235        // Check if the target file/dir really exists:
                    
236        if ( file_exists( $realPath ) )
                    
237        {
                    
253
                    
254        append_to_log( "PUT: realPath is $realPath" );
                    
255        append_to_log( "PUT: tempfile is $tempFile" );
                    
339
                    
340            if ( is_dir( $realPath ) )
                    
341            {
                    
                
class-wp-filesystem-ssh2.php https://gitlab.com/Gashler/sg | PHP | 517 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * To use this class you must follow these steps for PHP 5.2.6+
                    
6 *
                    
6 *
                    
7 * @contrib http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes
                    
8 *
                    
8 *
                    
9 * 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)
                    
10 *
                    
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.
                    
58		if ( !function_exists('stream_get_contents') ) {
                    
59			$this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function <code>stream_get_contents()</code>'));
                    
60			return;
                    
                
value.php https://gitlab.com/manuvelasco/agostoliquida | PHP | 347 lines
                    
1<?php
                    
2
                    
3$wrapper = file_stream_wrapper_get_instance_by_uri('public://');
                    
4$realpath = $wrapper->realpath();
                    
5$path = $wrapper->getDirectoryPath() . "/";
                    
9if (!defined('REVOLUTION_PUBLIC_PATH_FULL')) {
                    
10    define('REVOLUTION_PUBLIC_PATH_FULL', $realpath);
                    
11}
                    
                
OS_NS_stdlib.h https://gitlab.com/Kanedias/MangosDeprecated | C Header | 332 lines
                    
9 *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
                    
10 *  @author Jesper S. M|ller<stophph@diku.dk>
                    
11 *  @author and a cast of thousands...
                    
204#if !defined (ACE_HAS_WINCE)
                    
205#  if !defined (ACE_LACKS_REALPATH)
                    
206  ACE_NAMESPACE_INLINE_FUNCTION
                    
208  extern ACE_Export
                    
209#  endif /* !ACE_LACKS_REALPATH */
                    
210  char *realpath (const char *file_name, char *resolved_name);
                    
213  ACE_NAMESPACE_INLINE_FUNCTION
                    
214  wchar_t *realpath (const wchar_t *file_name, wchar_t *resolved_name);
                    
215#  endif /* ACE_HAS_WCHAR */
                    
                
HTTP_WebDAV_Server_vCal.php https://github.com/jacknicole/sugarcrm_dev.git | PHP | 430 lines
                    
1<?php
                    
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
                    
42
                    
43require_once 'modules/Calendar/Calendar.php';
                    
44
                    
44
                    
45require_once 'include/HTTP_WebDAV_Server/Server.php';
                    
46
                    
112            if ($base) { 
                    
113                $this->base = realpath($base); // TODO throw if not a directory
                    
114            } else if(!$this->base) {
                    
352            // open input stream
                    
353            $options["stream"] = fopen("php://input", "r");
                    
354            $content = '';
                    
                
File.php https://bitbucket.org/acidel/buykoala.git | PHP | 412 lines
                    
90        if (($fileRealpath = realpath($fileName)) === false) {
                    
91            $fileRealpath = self::findRealpathInIncludePath($file);
                    
92        }
                    
93
                    
94        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
95            #require_once 'Zend/Reflection/Exception.php';
                    
109     */
                    
110    public static function findRealpathInIncludePath($fileName)
                    
111    {
                    
116
                    
117            if ( ($foundRealpath = realpath($filePath)) !== false) {
                    
118                break;
                    
319             * Token ID's are explained here:
                    
320             * http://www.php.net/manual/en/tokens.php.
                    
321             */
                    
                
ContestsController.php https://gitlab.com/php2laravel/php-project-boost | PHP | 275 lines
                    
1<?php
                    
2
                    
132        $path = public_path('uploads/projects/' . $filename);
                    
133        Image::make($image->getRealPath())->fit(800, 800)->save($path);
                    
134
                    
                
ModuleAutoloader.php https://gitlab.com/yousafsyed/easternglamor | PHP | 442 lines
                    
244    {
                    
245        $modulePath = $dirPath . '/Module.php';
                    
246        if (substr($modulePath, 0, 7) === 'phar://') {
                    
280
                    
281        $fileRealPath = $file->getRealPath();
                    
282
                    
287            if (class_exists($class)) {
                    
288                $this->moduleClassMap[$class] = $fileRealPath;
                    
289                return $class;
                    
293        // Phase 1: Not executable phar, no stub, or stub did not provide Module class; try Module.php directly
                    
294        $moduleClassFile = 'phar://' . $fileRealPath . '/Module.php';
                    
295        $moduleFile = new SplFileInfo($moduleClassFile);
                    
307        $pharBaseName = $this->pharFileToModuleName($fileRealPath);
                    
308        $moduleClassFile = 'phar://' . $fileRealPath . '/' . $pharBaseName  . '/Module.php';
                    
309        $moduleFile = new SplFileInfo($moduleClassFile);
                    
                
categories.php https://github.com/azouts/oscommerce.git | PHP | 270 lines
                    
1<?php
                    
2/*
                    
186        if ( $error === false ) {
                    
187          $categories_image = new upload($data['image'], realpath('../' . DIR_WS_IMAGES . 'categories'));
                    
188
                    
                
login-customizations.inc.php https://gitlab.com/Gashler/dp | PHP | 192 lines
                    
1<?php
                    
2/**
                    
16*/
                    
17if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
                    
18	exit("Do not access this file directly.");
                    
74				/**
                    
75				* Styles login/registration *( i.e. `/wp-login.php` )*.
                    
76				*
                    
178								{
                    
179									echo /* No PHP here. */ $code."\n";
                    
180								}
                    
180								}
                    
181							else // Otherwise, safe to allow PHP code.
                    
182								{
                    
                
tests.py https://bitbucket.org/pcelta/python-django.git | Python | 233 lines
                    
13
                    
14data_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'data'))
                    
15city_file = os.path.join(data_path, 'cities', 'cities.shp')
                    
34# 3D freeway data derived from the National Elevation Dataset:
                    
35#  http://seamless.usgs.gov/products/9arc.php
                    
36interstate_data = (
                    
                
Filesystem.php https://github.com/nathanlon/twical.git | PHP | 412 lines
                    
45
                    
46require_once 'PHPUnit/Util/Filter.php';
                    
47
                    
47
                    
48PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
49
                    
126        foreach (self::collectEnd() as $blacklistedFile) {
                    
127            PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
                    
128        }
                    
315     * (
                    
316     *     [/home/sb/PHPUnit/Samples/Money/Money.php] => Array
                    
317     *         (
                    
320     *
                    
321     *     [/home/sb/PHPUnit/Samples/Money/MoneyBag.php] => Array
                    
322     *         (
                    
                
compiler.php https://bitbucket.org/jokusafet/magento2.git | PHP | 301 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
30define('DS', DIRECTORY_SEPARATOR);
                    
31define('BP', realpath(__DIR__ . '/../../..'));
                    
32/**
                    
34 */
                    
35require_once BP . '/app/code/core/Mage/Core/functions.php';
                    
36require_once BP . '/app/Mage.php';
                    
37
                    
38require __DIR__ . '/../../../app/autoload.php';
                    
39Magento_Autoload_IncludePath::addIncludePath(array(
                    
                
AbstractCommand.php https://gitlab.com/alexandresgv/siteentec | PHP | 341 lines
                    
1<?php
                    
2/**
                    
50     */
                    
51    const DEFAULT_MIGRATION_TEMPLATE = '/../../Migration/Migration.template.php.dist';
                    
52
                    
55     */
                    
56    const DEFAULT_SEED_TEMPLATE = '/../../Seed/Seed.template.php.dist';
                    
57
                    
199
                    
200        $possibleConfigFiles = array('phinx.php', 'phinx.json', 'phinx.yml');
                    
201        foreach ($possibleConfigFiles as $configFile) {
                    
221        $configFilePath = $this->locateConfigFile($input);
                    
222        $output->writeln('<info>using config file</info> .' . str_replace(getcwd(), '', realpath($configFilePath)));
                    
223
                    
233                    break;
                    
234                case 'php':
                    
235                    $parser = 'php';
                    
                
COciTest.php https://gitlab.com/RECITEC/yii | PHP | 378 lines
                    
1<?php
                    
2
                    
28		$dsn=self::DB_DSN_PREFIX.':dbname='.self::DB_HOST.':'.self::DB_PORT.'/'.self::DB_SERVICE.';charset=UTF8';
                    
29		$schemaFilePath=realpath(dirname(__FILE__).'/../data/oci.sql');
                    
30
                    
                
filestore_funcs.php https://github.com/Nerutiz/trades.git | PHP | 366 lines
                    
1<?php
                    
2/**
                    
131
                    
132	$rootPath = realPath($rootDir);
                    
133	$resolvedDir = realPath($rootDir."/".$dir);
                    
133	$resolvedDir = realPath($rootDir."/".$dir);
                    
134	$resolvedFullPath = realPath($fullPath);
                    
135
                    
365}
                    
366// No closing PHP tag on purpose.  Do not want it to print whitepace and thus not allow setting headers later.
                    
367
                    
                
Gateway.php https://github.com/silexlabs/Silex-v1.git | PHP | 455 lines
                    
37require_once(AMFPHP_BASE . "app/Filters.php");
                    
38require_once(AMFPHP_BASE . "app/Actions.php");
                    
39require_once(AMFPHP_BASE . "exception/AMFException.php");
                    
67			//Set gloriously nice error handling
                    
68			include_once(AMFPHP_BASE . "app/php5Executive.php");
                    
69			include_once(AMFPHP_BASE . "exception/php5Exception.php");
                    
74			include_once(AMFPHP_BASE . "app/Executive.php");
                    
75			include_once(AMFPHP_BASE . "exception/php4Exception.php");
                    
76		}
                    
325	 * @param $method The method used for reencoding, either "none", "iconv" or "runtime"
                    
326	 * @param $php The internal encoding that is assumed for PHP (typically ISO-8859-1)
                    
327	 * @param $sql The internal encoding that is assumed for SQL resources
                    
330		$this->_charsetMethod = $method;
                    
331		$this->_charsetPhp = $php;
                    
332		$this->_charsetSql = $sql;
                    
                
Loader.php https://gitlab.com/r.collas/site_central | PHP | 548 lines
                    
1<?php
                    
2/**
                    
12
                    
13require_once 'Exception.php';
                    
14
                    
74
                    
75		$realpath = null;
                    
76
                    
77		if(is_file($filepath))
                    
78			$realpath = $filepath;
                    
79
                    
79
                    
80		if(!$realpath) {
                    
81
                    
88
                    
89				$realpath = $path.DIRECTORY_SEPARATOR.$filepath;
                    
90
                    
                
CurlTest.php https://github.com/Exercise/zf2.git | PHP | 307 lines
                    
1<?php
                    
2/**
                    
126     * CURLOPT_CLOSEPOLICY never worked and returns false on setopt always:
                    
127     * @link http://de2.php.net/manual/en/function.curl-setopt.php#84277
                    
128     *
                    
146    {
                    
147        $this->client->setUri($this->baseuri . 'testRedirections.php');
                    
148
                    
182
                    
183        $this->client->setUri($this->baseuri . 'testRedirections.php');
                    
184
                    
197        // Method 1: Using the binary string of a file to PUT
                    
198        $this->client->setUri($this->baseuri . 'testRawPostData.php');
                    
199        $putFileContents = file_get_contents(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .
                    
212    {
                    
213        $this->client->setUri($this->baseuri . 'testRawPostData.php');
                    
214        $putFileContents = file_get_contents(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .
                    
                
fileManager.php https://github.com/pheeque/jquery.fileManager.git | PHP | 235 lines
                    
1<?php
                    
2/*
                    
28*
                    
29* Advanced users may wish to write a separate php script to control the
                    
30* ajax features of the File Manager.  Including callbacks for deleting
                    
41		$path = self::ResolvePath($path);
                    
42		$pos = strpos($path,realpath($_SERVER['DOCUMENT_ROOT']));
                    
43		if ($pos === false) return $path;
                    
43		if ($pos === false) return $path;
                    
44		return '/'.ltrim(substr($path,$pos+strlen(realpath($_SERVER['DOCUMENT_ROOT']))),DIRECTORY_SEPARATOR);
                    
45	}
                    
135		if (ob_get_level()) ob_end_clean();
                    
136		$destination = realpath($path);
                    
137
                    
217				// Read binary input stream and append it to temp file
                    
218				$in = fopen("php://input", "rb");
                    
219
                    
                
patients_con.php https://bitbucket.org/vincentbii/amurt.git | PHP | 447 lines
                    
8 8. * @date 31. March 2008
                    
9 9. * @version $Id: csql.php 820 2010-02-14 18:30:45Z jozo $
                    
10 10. */
                    
85                if("/" !== $file[0]) {
                    
86                    $file = realpath(".") . "/$file";
                    
87                }
                    
                
agavi.php https://github.com/enixu/agavi-src.git | PHP | 343 lines
                    
35
                    
36require('phing/Phing.php');
                    
37
                    
37
                    
38require(dirname(__FILE__) . '/../build.php');
                    
39AgaviBuild::bootstrap();
                    
82	$GLOBALS['OUTPUT']->write('  -D --define <property> <value>   Defines a configuration property' . PHP_EOL);
                    
83	$GLOBALS['OUTPUT']->write('  --verbose                        Provides more verbose configuration information' . PHP_EOL);
                    
84	$GLOBALS['OUTPUT']->write('  --agavi-source-directory <path>  Sets the Agavi source directory to <path>' . PHP_EOL);
                    
84	$GLOBALS['OUTPUT']->write('  --agavi-source-directory <path>  Sets the Agavi source directory to <path>' . PHP_EOL);
                    
85	$GLOBALS['OUTPUT']->write('  --include-path <path>            Appends <path> to the PHP include path' . PHP_EOL);
                    
86	$GLOBALS['OUTPUT']->write('  --logger <class>                 Sets the configuration logger class to <class>' . PHP_EOL);
                    
335} catch(Exception $e) {
                    
336	$GLOBALS['ERROR']->write(PHP_EOL);
                    
337	$GLOBALS['ERROR']->write(sprintf('%s:%d: %s', $e->getFile(), $e->getLine(), $e->getMessage()) . PHP_EOL);
                    
                
bootstrap.php https://github.com/schinzi/symfony.git | PHP | 189 lines
                    
1<?php
                    
2namespace Symfony\Framework\Bundle;
                    
31    public function registerExtensions(ContainerBuilder $container) {
                    
32        if (!$dir = realpath($this->getPath().'/DependencyInjection')) {
                    
33            return array(); }
                    
34        $finder = new Finder();
                    
35        $finder->files()->name('*Extension.php')->in($dir);
                    
36        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\DependencyInjection';
                    
37        foreach ($finder as $file) {
                    
38            $class = $prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php');
                    
39            if ('Extension' === substr($class, -9)) {
                    
41    public function registerCommands(Application $application) {
                    
42        if (!$dir = realpath($this->getPath().'/Command')) {
                    
43            return; }
                    
44        $finder = new Finder();
                    
45        $finder->files()->name('*Command.php')->in($dir);
                    
46        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command';
                    
                
Configuration.php https://github.com/304/Zend_Framework_Skeleton.git | PHP | 504 lines
                    
1<?php
                    
2/*
                    
34 *
                    
35 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
36 * @link        www.doctrine-project.org
                    
248     * Register migrations from a given directory. Recursively finds all files
                    
249     * with the pattern VersionYYYYMMDDHHMMSS.php as the filename and registers
                    
250     * them as migrations.
                    
256    {
                    
257        $path = realpath($path);
                    
258        $path = rtrim($path, '/');
                    
258        $path = rtrim($path, '/');
                    
259        $files = glob($path . '/Version*.php');
                    
260        $versions = array();
                    
                
interface.php https://bitbucket.org/mrmustarde/manhattan-beach.git | PHP | 293 lines
                    
27			<a href="<?php echo wp_nonce_url( admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG . '&amp;hmbkp_download_backup=' . $encoded_file . '&amp;hmbkp_schedule_id=' . $schedule->get_id() ), 'hmbkp-download_backup' ); ?>"><?php _e( 'Download', 'hmbkp' ); ?></a> |
                    
28			<a href="<?php echo wp_nonce_url( admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG . '&amp;hmbkp_delete_backup=' . $encoded_file . '&amp;hmbkp_schedule_id=' . $schedule->get_id() ), 'hmbkp-delete_backup' ); ?>" class="delete-action"><?php _e( 'Delete', 'hmbkp' ); ?></a>
                    
29
                    
71		function hmbkp_safe_mode_warning() {
                    
72			echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on.', 'hmbkp' ), '<code>PHP</code>', sprintf( '<a href="%1$s">%2$s</a>', __( 'http://php.net/manual/en/features.safe-mode.php', 'hmbkp' ), __( 'Safe Mode', 'hmbkp' ) ), '<code>' . __( 'Safe Mode', 'hmbkp' ) . '</code>' ) . '</p></div>';
                    
73		}
                    
119	if ( isset( $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php'] ) )
                    
120		$plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] = str_replace( 'Once activated you\'ll find me under <strong>Tools &rarr; Backups</strong>', 'Find me under <strong><a href="' . admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG ) . '">Tools &rarr; Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] );
                    
121
                    
251	<?php if ( $schedule->get_type() !== 'database' ) { ?>
                    
252		<a class="fancybox" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_edit_schedule_excludes_load', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a>  |
                    
253	<?php } ?>
                    
254
                    
255		<a class="hmbkp-run" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Run now', 'hmbkp' ); ?></a>  |
                    
256
                    
                
DeploystrategyAbstract.php https://gitlab.com/yousafsyed/easternglamor | PHP | 402 lines
                    
1<?php
                    
2/**
                    
364                $absoluteParentDir = $this->getDestDir() . '/' . $parentDir;
                    
365                if (! isset($stopDir) || (realpath($stopDir) !== realpath($absoluteParentDir))) {
                    
366                    // Remove the parent directory if it is empty
                    
                
cli_install.php https://gitlab.com/shapcy/opencart | PHP | 362 lines
                    
1<?php
                    
2
                    
11//   cd install
                    
12//   php cli_install.php install --db_hostname localhost \
                    
13//                               --db_username root \
                    
28define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
                    
29define('DIR_SYSTEM', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
                    
30define('DIR_OPENCART', str_replace('\\', '/', realpath(DIR_APPLICATION . '../')) . '/');
                    
37// Startup
                    
38require_once(DIR_SYSTEM . 'startup.php');
                    
39
                    
74	));
                    
75	echo 'php cli_install.php install ' . $options . "\n\n";
                    
76}
                    
143	$error = null;
                    
144	if (phpversion() < '5.0') {
                    
145		$error = 'Warning: You need to use PHP5 or above for OpenCart to work!';
                    
                
File.php https://github.com/EvanDotPro/zf1-mirror.git | PHP | 468 lines
                    
30 */
                    
31require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
109    {
                    
110        $realpath = realpath($filePath);
                    
111
                    
112        if ($realpath === false) {
                    
113            if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) {
                    
114                require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
                
AutoloadGenerator.php https://gitlab.com/campus-academy/krowkaramel | PHP | 393 lines
                    
1<?php // phpcs:ignore WordPress.Files.FileName
                    
2/**
                    
7
                    
8// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
                    
9// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
                    
9// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
                    
10// phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
                    
11// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
                    
11// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
                    
12// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
                    
13// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
                    
13// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
                    
14// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
                    
15// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
                    
18// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
                    
19// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
                    
20// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
                    
                
SplFileInfo.php https://gitlab.com/Blueprint-Marketing/hhvm | PHP | 444 lines
                    
1<?php
                    
2
                    
2
                    
3// This doc comment block generated by idl/sysdoc.php
                    
4/**
                    
4/**
                    
5 * ( excerpt from http://docs.hhvm.com/manual/en/class.splfileinfo.php )
                    
6 *
                    
16
                    
17  // This doc comment block generated by idl/sysdoc.php
                    
18  /**
                    
18  /**
                    
19   * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.construct.php )
                    
20   *
                    
339  /**
                    
340   * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.getrealpath.php )
                    
341   *
                    
                
sfPropelBaseTask.class.php https://github.com/bheneka/gitta.git | PHP | 357 lines
                    
1<?php
                    
2
                    
34      sfToolkit::addIncludePath(array(
                    
35        sfConfig::get('sf_propel_runtime_path', realpath(dirname(__FILE__).'/../lib/vendor')),
                    
36        dirname(__FILE__),
                    
214      sfConfig::get('sf_symfony_lib_dir'),
                    
215      sfConfig::get('sf_propel_generator_path', realpath(dirname(__FILE__).'/../vendor/propel-generator/classes')),
                    
216    ));
                    
232    $args[] = '-f';
                    
233    $args[] = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'propel-generator'.DIRECTORY_SEPARATOR.'build.xml');
                    
234
                    
261
                    
262    require_once dirname(__FILE__).'/sfPhing.class.php';
                    
263
                    
264    // enable output buffering
                    
265    Phing::setOutputStream(new OutputStream(fopen('php://output', 'w')));
                    
266    Phing::startup();
                    
                
Configuration.php https://gitlab.com/CORP-RESELLER/shopping-cart-lite | PHP | 346 lines
                    
1<?php
                    
2/**
                    
216
                    
217        $caPath = realpath(
                    
218            dirname(__FILE__) .
                    
                
bootstrap.php https://github.com/epsd/moodle.git | PHP | 222 lines
                    
60} else if (version_compare($phpunitversion, '3.6.0', 'lt')) {
                    
61    phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITWRONG, $phpunitversion);
                    
62}
                    
65if (!include_once('PHPUnit/Extensions/Database/Autoload.php')) {
                    
66    phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITEXTMISSING, 'phpunit/DbUnit');
                    
67}
                    
94if (!isset($CFG->phpunit_dataroot)) {
                    
95    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_dataroot in config.php, can not run tests!');
                    
96}
                    
144if (!isset($CFG->phpunit_prefix)) {
                    
145    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_prefix in config.php, can not run tests!');
                    
146}
                    
150if (isset($CFG->prefix) and $CFG->prefix === $CFG->phpunit_prefix) {
                    
151    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, '$CFG->prefix and $CFG->phpunit_prefix must not be identical, can not run tests!');
                    
152}
                    
                
Set.php https://github.com/eexit/Smak.git | PHP | 362 lines
                    
1<?php
                    
2
                    
9
                    
10require_once __DIR__ . '/../../../../vendor/autoload.php';
                    
11
                    
222        
                    
223        $this->string($set->getSplInfo()->getRealPath())
                    
224             ->isEqualTo($set_root);
                    
315
                    
316        $set_root = $set->getSplInfo()->getRealPath();
                    
317        $set_name = $set->name;
                    
327
                    
328        $this->string($unserialized_instance->getSplInfo()->getRealPath())
                    
329             ->isEqualTo($set_root);
                    
                
CModule.php https://github.com/sassman/django-benchmark.git | PHP | 483 lines
                    
1<?php
                    
2/**
                    
16 * @author Qiang Xue <qiang.xue@gmail.com>
                    
17 * @version $Id: CModule.php 2094 2010-05-05 00:51:49Z qiang.xue $
                    
18 * @package system.base
                    
49	 * @param mixed the module configuration. It can be either an array or
                    
50	 * the path of a PHP file returning the configuration array.
                    
51	 */
                    
142	{
                    
143		if(($this->_basePath=realpath($path))===false || !is_dir($this->_basePath))
                    
144			throw new CException(Yii::t('yii','Base path "{path}" is not a valid directory.',
                    
189	{
                    
190		if(($this->_modulePath=realpath($value))===false || !is_dir($this->_modulePath))
                    
191			throw new CException(Yii::t('yii','The module path "{path}" is not a valid directory.',
                    
                
ext_imagick.cpp https://github.com/tstarling/hiphop-php.git | C++ | 359 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com)     |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
autoloader.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 203 lines
                    
36 * vendor/bin/phpunit core_component_testcase
                    
37 * vendor/bin/phpunit lib/tests/component_test.php
                    
38 * vendor/bin/phpunit core_component_testcase lib/tests/component_test.php
                    
44 */
                    
45class phpunit_autoloader implements \PHPUnit\Runner\TestSuiteLoader {
                    
46    public function load($suiteClassName, $suiteClassFile = '') {
                    
74
                    
75            throw new PHPUnit\Framework\Exception(
                    
76                sprintf("Class '%s' could not be found in '%s'.", $suiteClassName, $suiteClassFile)
                    
100                    $testfile = implode('_', $parts);
                    
101                    $fullpath = "{$fulldir}/tests/{$testfile}_test.php";
                    
102                    if (is_readable($fullpath)) {
                    
177            if ($class->isSubclassOf('PHPUnit\Framework\TestCase') and !$class->isAbstract()) {
                    
178                if (realpath($includePathFilename) === realpath($class->getFileName())) {
                    
179                    $candidates[] = $loadedClass;
                    
                
FilesystemAdapter.php https://gitlab.com/mdabutaleb/bitm-laravel-1 | PHP | 433 lines
                    
1<?php
                    
2
                    
118    {
                    
119        $stream = fopen($file->getRealPath(), 'r+');
                    
120
                    
164     */
                    
165    public function prepend($path, $data, $separator = PHP_EOL)
                    
166    {
                    
181     */
                    
182    public function append($path, $data, $separator = PHP_EOL)
                    
183    {
                    
                
fs.js https://gitlab.com/nguyenthehiep3232/marius | JavaScript | 337 lines
                    
1/*
                    
2	MIT License http://www.opensource.org/licenses/mit-license.php
                    
3	Author Tobias Koppers @sokra
                    
120 * @property {function(string, StatsCallback): void=} lstat
                    
121 * @property {(function(string, BufferOrStringCallback): void)=} realpath
                    
122 * @property {(function(string=): void)=} purge
                    
                
index.php https://github.com/Excito/horde3.git | PHP | 284 lines
                    
55        if ($vfs->exists($path, 'conf.php')) {
                    
56            if (($result = $vfs->rename($path, 'conf.php', $path, '/conf.bak.php')) === true) {
                    
57                $notification->push(_("Successfully saved backup configuration."), 'horde.success');
                    
69        } else {
                    
70            $notification->push(sprintf(_("Successfully wrote %s"), Util::realPath($path . '/conf.php')), 'horde.success');
                    
71            unset($_SESSION['_config'][$app]);
                    
177    if (!file_exists($path . '/conf.php')) {
                    
178        /* No conf.php exists. */
                    
179        $apps[$i]['conf'] = $conf_link . $error . '</a>';
                    
188        /* Get the generated php version. */
                    
189        if (($php_ver = _getVersion($path . '/conf.php')) === false) {
                    
190            /* No version found in generated php, suggest regenarating
                    
250            $notification->push(_("Uploaded all application setup files to the server."), 'horde.success');
                    
251            $url = Horde::applicationUrl('admin/setup/index.php', true);
                    
252            header('Location: ' . $url);
                    
                
YamlFileLoaderTest.php https://gitlab.com/Marwamimo/Crowdrise_Web | PHP | 243 lines
                    
1<?php
                    
2
                    
19use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
                    
20use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
                    
21use Symfony\Component\Config\Loader\LoaderResolver;
                    
24
                    
25class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
                    
26{
                    
30    {
                    
31        self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
                    
32        require_once self::$fixturesPath.'/includes/foo.php';
                    
32        require_once self::$fixturesPath.'/includes/foo.php';
                    
33        require_once self::$fixturesPath.'/includes/ProjectExtension.php';
                    
34    }
                    
108            new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')),
                    
109            new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')),
                    
110            $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')),
                    
                
stats.php https://github.com/bcmoney/OpenRecommender.git | PHP | 214 lines
                    
17 */
                    
18require_once realpath(dirname(__FILE__).'/../TeraWurfl.php');
                    
19
                    
78		<h3><br />
                    
79			<a href="index.php">&lt;&lt; Back	to main page </a></h3>
                    
80		<table width="800" border="0" cellspacing="0" cellpadding="0">
                    
122?>
                    
123<tr><td class="<?php echo $class;?>">UserAgentMatcher: <span class="setting"><?php echo $matcher['name']?></span><br />
                    
124Rows: <span class="setting"><?php echo $matcher['stats']['rows']?></span><br />
                    
125Table Size: <span class="setting"><?php echo WurflSupport::formatBytes($matcher['stats']['bytesize'])?></span></td></tr>
                    
126<?php
                    
127	$i++;
                    
195					CAPABILITY_FILTER:
                    
196						<?php echo "<pre class=\"setting\">".var_export(TeraWurflConfig::$CAPABILITY_FILTER,true)."</pre>";?>
                    
197						the capability filter that is used to determine which capabilities are available<br />
                    
                
AddressTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 298 lines
                    
1<?php
                    
2require_once realpath(dirname(__FILE__)) . '/../TestHelper.php';
                    
3
                    
3
                    
4class Braintree_AddressTest extends PHPUnit_Framework_TestCase
                    
5{
                    
                
File.php https://bitbucket.org/Ebozavrik/test-application.git | PHP | 446 lines
                    
90
                    
91        $fileRealpath = realpath($fileName);
                    
92        if ($fileRealpath) {
                    
93            // realpath() doesn't return false if Suhosin is included
                    
94            // see http://uk3.php.net/manual/en/function.realpath.php#82770
                    
95            if (!file_exists($fileRealpath)) {
                    
103
                    
104        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
105            require_once 'Zend/Reflection/Exception.php';
                    
127
                    
128            if (( $foundRealpath = realpath($filePath) ) !== false) {
                    
129                break;
                    
340             * Token ID's are explained here:
                    
341             * http://www.php.net/manual/en/tokens.php.
                    
342             */
                    
                
template.php https://github.com/rentasite/drupal6_sandbox.git | PHP | 273 lines
                    
1<?php
                    
2// $Id: template.php,v 3.1.0.12 2009/06/07 00:00:00 hass Exp $
                    
20 */
                    
21include_once(realpath(dirname(__FILE__) .'/template.inc'));
                    
22
                    
87 */
                    
88function phptemplate_preprocess_maintenance_page(&$vars) {
                    
89  // Dynamic sidebar switching. Turn off sidebars in maintenance mode.
                    
                
File.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 432 lines
                    
89        
                    
90        $fileRealpath = realpath($fileName);
                    
91        if ($fileRealpath) {
                    
92            // realpath() doesn't return false if Suhosin is included
                    
93            // see http://uk3.php.net/manual/en/function.realpath.php#82770
                    
94            if (!file_exists($fileRealpath)) {
                    
102
                    
103        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
104            #require_once 'Zend/Reflection/Exception.php';
                    
125
                    
126            if ( ($foundRealpath = realpath($filePath)) !== false) {
                    
127                break;
                    
329             * Token ID's are explained here:
                    
330             * http://www.php.net/manual/en/tokens.php.
                    
331             */
                    
                
smarty_internal_config.php https://gitlab.com/zohaibsaleem/shipcliq | PHP | 136 lines
                    
1<?php //0046a
                    
2if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
                    
3?>
                    
                
LocalStream.php https://gitlab.com/mohamed_hussein/prodt | PHP | 432 lines
                    
98   */
                    
99  public function realpath() {
                    
100    return $this->getLocalPath();
                    
123
                    
124    // In PHPUnit tests, the base path for local streams may be a virtual
                    
125    // filesystem stream wrapper URI, in which case this local stream acts like
                    
131
                    
132    $realpath = realpath($path);
                    
133    if (!$realpath) {
                    
134      // This file does not yet exist.
                    
135      $realpath = realpath(dirname($path)) . '/' . \Drupal::service('file_system')->basename($path);
                    
136    }
                    
137    $directory = realpath($this->getDirectoryPath());
                    
138    if (!$realpath || !$directory || strpos($realpath, $directory) !== 0) {
                    
139      return FALSE;
                    
                
Config.php https://gitlab.com/x33n/ImpressPages | PHP | 172 lines
                    
1<?php
                    
2/**
                    
43                    // show instructions how to set baseUrl manually
                    
44                    include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';
                    
45                    exit();
                    
49                    // show instructions how to set baseUrl manually
                    
50                    include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';
                    
51                    exit();
                    
58        if (empty($this->config['baseDir'])) {
                    
59            $this->config['baseDir'] = realpath(dirname($server['SCRIPT_FILENAME']));
                    
60        }
                    
                
weeTestSuite.class.php https://github.com/extend/wee.git | PHP | 412 lines
                    
1<?php
                    
2
                    
30	"make test". It is not meant to be used to test applications. There are much
                    
31	better tools for this purpose, like PHPUnit, available at http://phpunit.de
                    
32
                    
78		!defined('WEE_CODE_COVERAGE') || function_exists('xdebug_enable')
                    
79			or burn('ConfigurationException', _WT('The XDebug PHP extension is required for code coverage analysis.'));
                    
80
                    
81		if (defined('WEE_ON_WINDOWS'))
                    
82			$sTestsPath = realpath(getcwd()) . '\\' . str_replace('/', '\\', $sTestsPath);
                    
83		else
                    
83		else
                    
84			$sTestsPath = realpath(getcwd()) . '/' . $sTestsPath;
                    
85
                    
96			// Skip files not ending with .php
                    
97			if (substr($sPath, -strlen(PHP_EXT)) != PHP_EXT)
                    
98				continue;
                    
                
FileEngine.php https://gitlab.com/shubam39/CakeTooDoo | PHP | 431 lines
                    
1<?php
                    
2/**
                    
8 *
                    
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
10 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
16 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
17 * @link          http://cakephp.org CakePHP(tm) Project
                    
18 * @since         CakePHP(tm) v 1.2.0.4933
                    
18 * @since         CakePHP(tm) v 1.2.0.4933
                    
19 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
20 */
                    
208		}
                    
209		$path = $this->_File->getRealPath();
                    
210		$this->_File = null;
                    
244
                    
245			$path = $path->getRealPath() . DS;
                    
246			if (!in_array($path, $cleared)) {
                    
                
generateSitemap.php https://github.com/Seizam/seizamcore.git | PHP | 466 lines
                    
1<?php
                    
2/**
                    
28
                    
29require_once( dirname( __FILE__ ) . '/Maintenance.php' );
                    
30
                    
46	 *
                    
47	 * @link http://www.sitemaps.org/faq.php#faq_sitemap_size
                    
48	 *
                    
199
                    
200		return realpath( $fspath ) . DIRECTORY_SEPARATOR ;
                    
201	}
                    
                
autoloader.php https://github.com/pauln/moodle.git | PHP | 203 lines
                    
36 * vendor/bin/phpunit core_component_testcase
                    
37 * vendor/bin/phpunit lib/tests/component_test.php
                    
38 * vendor/bin/phpunit core_component_testcase lib/tests/component_test.php
                    
44 */
                    
45class phpunit_autoloader implements PHPUnit_Runner_TestSuiteLoader {
                    
46    public function load($suiteClassName, $suiteClassFile = '') {
                    
74
                    
75            throw new PHPUnit_Framework_Exception(
                    
76                sprintf("Class '%s' could not be found in '%s'.", $suiteClassName, $suiteClassFile)
                    
100                    $testfile = implode('_', $parts);
                    
101                    $fullpath = "{$fulldir}/tests/{$testfile}_test.php";
                    
102                    if (is_readable($fullpath)) {
                    
177            if ($class->isSubclassOf('PHPUnit_Framework_TestCase') and !$class->isAbstract()) {
                    
178                if (realpath($includePathFilename) === realpath($class->getFileName())) {
                    
179                    $candidates[] = $loadedClass;
                    
                
 

Source

Language