PageRenderTime 548ms queryTime 35ms sortTime 36ms getByIdsTime 213ms findMatchingLines 197ms

100+ results results for 'php rtrim' (548 ms)

Not the results you expected?
Resource.php https://bitbucket.org/valmy/openx.git | PHP | 436 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: Resource.php 14026 2009-02-09 19:03:22Z matthew $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
115            if (!$this->hasResourceType($type)) {
                    
116                require_once 'Zend/Loader/Exception.php';
                    
117                throw new Zend_Loader_Exception("Invalid resource type $type; cannot load resource");
                    
                
Twig.php https://gitlab.com/3dplex/3d-plex-main-site | PHP | 420 lines
                    
1<?php
                    
2<<<<<<< HEAD
                    
107=======
                    
108            $path_append = rtrim($this->grav['pages']->base(), '/');
                    
109            if ($language->getDefault() != $active_language || $config->get('system.languages.include_default_lang') === true) {
                    
185                    'uri'               => $this->grav['uri'],
                    
186                    'base_dir'          => rtrim(ROOT_DIR, '/'),
                    
187<<<<<<< HEAD
                    
                
Ftp.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 509 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 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
210        if($out !== "/") {
                    
211            $out = rtrim($out, "/");
                    
212        }
                    
444    /**
                    
445     * Get directory contents in PHP array
                    
446     *
                    
                
utils.php https://gitlab.com/Rad1calDreamer/honey | PHP | 461 lines
                    
5	{
                    
6		if (strtoupper(substr(PHP_OS, 0, 3)) === "WIN")
                    
7		{
                    
14
                    
15				if (strpos($ffhtaccessContent, "/bitrix/virtual_file_system.php") === false)
                    
16				{
                    
27						"RewriteCond %{REQUEST_FILENAME} \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2}\r\n".
                    
28						"RewriteCond %{REQUEST_FILENAME} !/bitrix/virtual_file_system.php$\r\n".
                    
29						"RewriteRule ^(.*)$ /bitrix/virtual_file_system.php [L]", $ffhtaccessContent);
                    
56
                    
57			if (file_exists($absolutePath."/".$dirName."/description.php"))
                    
58			{
                    
60				{
                    
61					if (file_exists(($fname = $absolutePath."/".$dirName."/lang/".LangSubst(LANGUAGE_ID)."/description.php")))
                    
62						__IncludeLang($fname);
                    
                
zbzippclzip.php https://bitbucket.org/anneivycat/california-tour.git | PHP | 406 lines
                    
1<?php
                    
2/**
                    
118			
                    
119				$pclzip_file = ABSPATH . 'wp-admin/includes/class-pclzip.php';
                    
120				pb_backupbuddy::status( 'details', 'PCLZip class not found. Attempting to load from `' . $pclzip_file . '`.' );
                    
198			// The basedir must have a trailing normalized directory separator
                    
199			$basedir = ( rtrim( trim( $dir ), self::DIRECTORY_SEPARATORS ) ) . self::NORM_DIRECTORY_SEPARATOR;
                    
200		
                    
212				
                    
213				$pclzip_file = ABSPATH . 'wp-admin/includes/class-pclzip.php';
                    
214				pb_backupbuddy::status( 'details', 'PCLZip class not found. Attempting to load from `' . $pclzip_file . '`.' );
                    
                
Rss.php https://github.com/vtiger-jp/vtigercrm-5.1.x-ja.git | PHP | 464 lines
                    
1<?php
                    
2/*********************************************************************************
                    
16
                    
17require_once('data/CRMEntity.php');
                    
18require_once('include/database/PearDatabase.php');
                    
19// Require the xmlParser class
                    
20//require_once('include/feedParser/xmlParser.php');
                    
21
                    
22// Require the feedParser class
                    
23//require_once('include/feedParser/feedParser.php');
                    
24
                    
77				$stringConvert = function_exists(iconv) ? @iconv("UTF-8",$default_charset,$item[title]) : $item[title];
                    
78				$rss_title= ltrim(rtrim($stringConvert));
                    
79				
                    
177			}
                    
178			$shtml .= "<td class=\"rssTitle\"><a href=\"index.php?module=Rss&action=ListView&record=$allrssrow[rssid]
                    
179				\" class=\"rssTitle\">".$allrssrow[rsstitle]."</a></td>";
                    
                
class.router.php https://github.com/Emaratilicious/Garden.git | PHP | 208 lines
                    
1<?php
                    
2
                    
110   public function ReverseRoute($Url) {
                    
111      $Root = rtrim(Gdn::Request()->Domain().'/'.Gdn::Request()->WebRoot(), '/');
                    
112
                    
                
Helpers.php https://github.com/premiumcombination/nts.git | PHP | 206 lines
                    
1<?php
                    
2
                    
41				->title("$file:$line")
                    
42				->setHtml(htmlSpecialChars(rtrim($dir, DIRECTORY_SEPARATOR)) . DIRECTORY_SEPARATOR . '<b>' . htmlSpecialChars(basename($file)) . '</b>');
                    
43		} else {
                    
76		if (is_bool($var)) {
                    
77			return '<span class="php-bool">' . ($var ? 'TRUE' : 'FALSE') . "</span>\n";
                    
78
                    
79		} elseif ($var === NULL) {
                    
80			return "<span class=\"php-null\">NULL</span>\n";
                    
81
                    
82		} elseif (is_int($var)) {
                    
83			return "<span class=\"php-int\">$var</span>\n";
                    
84
                    
89			}
                    
90			return "<span class=\"php-float\">$var</span>\n";
                    
91
                    
                
ReleaseController.php https://gitlab.com/brucealdridge/yii2 | PHP | 211 lines
                    
1<?php
                    
2/**
                    
150        foreach($changelog as $i => $line) {
                    
151            $changelog[$i] = rtrim($line);
                    
152        }
                    
201            "function getVersion()\n    {\n        return '$version';",
                    
202            YII2_PATH . '/BaseYii.php');
                    
203    }
                    
                
block_recent_topics.php https://github.com/dravekx/stargate-portal.git | PHP | 218 lines
                    
1<?php
                    
2/**
                    
6* @begin   Sunday, 20th May, 2007
                    
7* @copyright (c) 2005-2008 phpbbireland
                    
8* @home    http://www.phpbbireland.com
                    
8* @home    http://www.phpbbireland.com
                    
9* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
10* @note: Do not remove this copyright. Just append yours if you have modified it,
                    
12*
                    
13* @version $Id: block_recent_topics.php 297 2008-12-30 18:40:30Z JohnnyTheOne $
                    
14* Updated: 21 February 2008
                    
44
                    
45	global $user, $forum_id, $phpbb_root_path, $phpEx, $SID, $config , $template, $portal_config, $userdata, $config, $db, $phpEx;
                    
46
                    
171
                    
172			$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($recent_topic_row[$i]['forum_id']) ? $recent_topic_row[$i]['forum_id'] : $forum_id) );
                    
173
                    
                
arr.php https://gitlab.com/ken3/bluSky | PHP | 602 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
119			// Remove ending delimiters, spaces, and wildcards
                    
120			$path = rtrim($path, "{$delimiter} *");
                    
121
                    
351	/**
                    
352	 * Recursive version of [array_map](http://php.net/array_map), applies one or more
                    
353	 * callbacks to all elements in an array, including sub-arrays.
                    
403	 * Merges one or more arrays recursively and preserves all keys.
                    
404	 * Note that this does not work the same as [array_merge_recursive](http://php.net/array_merge_recursive)!
                    
405	 *
                    
                
fpdi_bridge.php https://github.com/pauln/moodle.git | PHP | 208 lines
                    
1<?php
                    
2/**
                    
188        {
                    
189            $data = preg_replace('/[^0-9A-Fa-f]/', '', rtrim($data, '>'));
                    
190            if ((strlen($data) % 2) == 1) {
                    
                
Resource.php https://github.com/rico/flextrine.git | PHP | 467 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: Resource.php 23568 2010-12-20 08:13:20Z mjh_ca $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
90        }
                    
91        require_once 'Zend/Loader/Autoloader.php';
                    
92        Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);
                    
                
Helpers.php https://gitlab.com/paveltizek/shop | PHP | 221 lines
                    
1<?php
                    
2
                    
31				$file . ($line ? ":$line" : ''),
                    
32				rtrim(dirname($file), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
                    
33				basename($file),
                    
115	{
                    
116		if (PHP_VERSION_ID < 50400) {
                    
117			return @iconv('UTF-16', 'UTF-8//IGNORE', iconv('UTF-8', 'UTF-16//IGNORE', $s)); // intentionally @
                    
                
CookieJar.php https://bitbucket.org/Ebozavrik/test-application.git | PHP | 441 lines
                    
1<?php
                    
2/**
                    
17 * @subpackage CookieJar
                    
18 * @version    $Id: CookieJar.php 24856 2012-06-01 01:10:47Z adamlundrigan $
                    
19 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
25 */
                    
26require_once "Zend/Uri.php";
                    
27/**
                    
29 */
                    
30require_once "Zend/Http/Cookie.php";
                    
31/**
                    
33 */
                    
34require_once "Zend/Http/Response.php";
                    
35
                    
142        } else {
                    
143            require_once 'Zend/Http/Exception.php';
                    
144            throw new Zend_Http_Exception( 'Supplient argument is not a valid cookie string or object' );
                    
                
ListenerOptions.php https://gitlab.com/yousafsyed/easternglamor | PHP | 396 lines
                    
1<?php
                    
2/**
                    
269        if ($this->getConfigCacheKey()) {
                    
270            return $this->getCacheDir() . '/module-config-cache.' . $this->getConfigCacheKey().'.php';
                    
271        }
                    
272
                    
273        return $this->getCacheDir() . '/module-config-cache.php';
                    
274    }
                    
353        if ($this->getModuleMapCacheKey()) {
                    
354            return $this->getCacheDir() . '/module-classmap-cache.' . $this->getModuleMapCacheKey() . '.php';
                    
355        }
                    
356
                    
357        return $this->getCacheDir() . '/module-classmap-cache.php';
                    
358    }
                    
391    {
                    
392        $path = rtrim($path, '/');
                    
393        $path = rtrim($path, '\\');
                    
                
Resource.php https://github.com/ParveenArora/AddressHunter.git | PHP | 467 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: Resource.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
90        }
                    
91        require_once 'Zend/Loader/Autoloader.php';
                    
92        Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);
                    
                
utils.php https://gitlab.com/elasa/shop2.elasa.ir | PHP | 313 lines
                    
1<?php
                    
2
                    
44    if(image_check_memory_usage($imgfile,$newwidth,$newheight)){
                    
45	require_once('php_image_magician.php');
                    
46	$magicianObj = new imageLib($imgfile);
                    
55    if(image_check_memory_usage($imgfile,$newwidth,$newheight)){
                    
56	require_once('php_image_magician.php');
                    
57	$magicianObj = new imageLib($imgfile);
                    
78    $files = scandir($path);
                    
79    $cleanPath = rtrim($path, '/'). '/';
                    
80
                    
                
AssetCompressHelper.php git://github.com/markstory/asset_compress.git | PHP | 422 lines
                    
1<?php
                    
2declare(strict_types=1);
                    
305        if (!$devMode) {
                    
306            $path = rtrim($path, '/') . '/';
                    
307            $route = $path . $this->_getBuildName($target);
                    
353
                    
354        $base = rtrim($base, '/') . '/';
                    
355        $query = empty($query) ? '' : '?' . http_build_query($query);
                    
                
file_helper.php https://bitbucket.org/inventxo/inventxo_root_php.git | 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 *
                    
123		// Trim the trailing slash
                    
124		$path = rtrim($path, DIRECTORY_SEPARATOR);
                    
125
                    
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)))
                    
                
ProxyFactory.php https://github.com/weaverryan/mongodb-odm.git | PHP | 283 lines
                    
1<?php
                    
2/*
                    
29 *
                    
30 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
31 * @since       1.0
                    
83        if ($this->autoGenerate && ! class_exists($fqn, false)) {
                    
84            $fileName = $this->proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
                    
85            $this->generateProxyClass($this->dm->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
                    
106        $proxyDir = $toDir ?: $this->proxyDir;
                    
107        $proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
                    
108        foreach ($classes as $class) {
                    
199                $methods .= $parameterString . ')';
                    
200                $methods .= PHP_EOL . '    {' . PHP_EOL;
                    
201                $methods .= '        $this->load();' . PHP_EOL;
                    
202                $methods .= '        return parent::' . $method->getName() . '(' . $argumentString . ');';
                    
203                $methods .= PHP_EOL . '    }' . PHP_EOL;
                    
204            }
                    
                
Shell.php https://gitlab.com/oytunistrator/92five | PHP | 229 lines
                    
1<?php
                    
2
                    
16use Symfony\Component\Process\ProcessBuilder;
                    
17use Symfony\Component\Process\PhpExecutableFinder;
                    
18
                    
21 *
                    
22 * Support for history and completion only works with a PHP compiled
                    
23 * with readline support (either --with-readline or --with-libedit)
                    
38     *
                    
39     * If there is no readline support for the current PHP executable
                    
40     * a \RuntimeException exception is thrown.
                    
66        $this->output->writeln($this->getHeader());
                    
67        $php = null;
                    
68        if ($this->processIsolation) {
                    
68        if ($this->processIsolation) {
                    
69            $finder = new PhpExecutableFinder();
                    
70            $php = $finder->find();
                    
                
index.php https://gitlab.com/zanderwong/admin | PHP | 195 lines
                    
1<?php
                    
2
                    
79 *
                    
80 * Normally you will set your default controller in the routes.php file.
                    
81 * You can, however, force a custom routing by hard-coding a
                    
112 * config class when initialized. This allows you to set custom config
                    
113 * items or override any default config values found in the config.php file.
                    
114 * This can be handy as it permits you to share one application between
                    
143// ensure there's a trailing slash
                    
144$system_path = rtrim($system_path, '/') . '/';
                    
145
                    
158
                    
159// The PHP file extension
                    
160// this global constant is deprecated.
                    
160// this global constant is deprecated.
                    
161define('EXT', '.php');
                    
162
                    
                
reserved.pl https://github.com/motok5/gtags.git | Perl | 259 lines
                    
34#
                    
35# 1001 - 2000: Reserved variable (PHP)
                    
36# 2001 -; Reserved word (wide sense)
                    
239		print "\t/* Delete blanks. Ex. ' # define ' => '#define' */\n";
                    
240		print "\tstr = strtrim(str, TRIM_ALL, &len);\n";
                    
241		print "\n";
                    
                
class-wc-shipping-legacy-flat-rate.php https://gitlab.com/hunt9310/ras | PHP | 379 lines
                    
1<?php
                    
2if ( ! defined( 'ABSPATH' ) ) {
                    
26		$this->method_title       = __( 'Flat Rate (Legacy)', 'woocommerce' );
                    
27		$this->method_description = sprintf( __( '<strong>This method is deprecated in 2.6.0 and will be removed in future versions - we recommend disabling it and instead setting up a new rate within your <a href="%s">Shipping Zones</a>.</strong>', 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&tab=shipping' ) );
                    
28		$this->init();
                    
40		if ( 'no' === $this->settings[ 'enabled' ] ) {
                    
41			wp_redirect( admin_url( 'admin.php?page=wc-settings&tab=shipping&section=options' ) );
                    
42			exit;
                    
76	public function init_form_fields() {
                    
77		$this->form_fields = include( 'includes/settings-flat-rate.php' );
                    
78	}
                    
86	protected function evaluate_cost( $sum, $args = array() ) {
                    
87		include_once( WC()->plugin_path() . '/includes/libraries/class-wc-eval-math.php' );
                    
88
                    
117		// Trim invalid start/end characters
                    
118		$sum = rtrim( ltrim( $sum, "\t\n\r\0\x0B+*/" ), "\t\n\r\0\x0B+-*/" );
                    
119
                    
                
Database.php https://github.com/rgranadino/magento-mirror.git | PHP | 350 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) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
295    {
                    
296        $folderName = rtrim($folderName, '/');
                    
297        if (!strlen($folderName)) {
                    
                
Database.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 350 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 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
295    {
                    
296        $folderName = rtrim($folderName, '/');
                    
297        if (!strlen($folderName)) {
                    
                
Resource.php https://github.com/rakesh-sankar/PHP-Framework-Benchmark.git | PHP | 467 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: Resource.php 23567 2010-12-20 08:12:16Z mjh_ca $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
90        }
                    
91        require_once 'Zend/Loader/Autoloader.php';
                    
92        Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);
                    
                
ValidFunctionNameSniff.php https://github.com/mikesname/ehri-ica-atom.git | PHP | 263 lines
                    
17if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
                    
18    throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found');
                    
19}
                    
82     *
                    
83     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
                    
84     * @param int                  $stackPtr  The position where this token was
                    
89     */
                    
90    protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
                    
91    {
                    
161     *
                    
162     * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
                    
163     * @param int                  $stackPtr  The position where this token was
                    
167     */
                    
168    protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
                    
169    {
                    
                
WireUpload.php https://bitbucket.org/webbear/processwire-base-installation.git | PHP | 409 lines
                    
1<?php
                    
2
                    
30	protected $validExtensions = array(); 
                    
31	protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh'); 
                    
32	protected $errors = array();
                    
42			UPLOAD_ERR_OK => $this->_('Successful Upload'),
                    
43			UPLOAD_ERR_INI_SIZE => $this->_('The uploaded file exceeds the upload_max_filesize directive in php.ini.'),
                    
44			UPLOAD_ERR_FORM_SIZE => $this->_('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.'),
                    
77
                    
78		$f = $this->getPhpFiles();
                    
79		if(!$f) return $files;
                    
107	/**
                    
108	 * Returns PHP's $_FILES or one constructed from an ajax upload
                    
109	 *
                    
110	 */
                    
111	protected function getPhpFiles() {
                    
112		if(isset($_SERVER['HTTP_X_FILENAME']) && $this->allowAjax) return $this->getPhpFilesAjax();
                    
                
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
                    
70		$path = self::ResolvePath($path);
                    
71		$path = rtrim($path,'/');
                    
72		if (strpos($path,$rootPath)===FALSE) $path = $rootPath;
                    
217				// Read binary input stream and append it to temp file
                    
218				$in = fopen("php://input", "rb");
                    
219
                    
                
list_bullet_renderer.cls.php https://github.com/practo/dompdf.git | PHP | 200 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * DOMPDF - PHP5 HTML to PDF renderer
                    
4 *
                    
4 *
                    
5 * File: $RCSfile: list_bullet_renderer.cls.php,v $
                    
6 * Created on: 2004-06-23
                    
25 * Alternatively, you may distribute this software under the terms of the
                    
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
                    
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.
                    
29 *
                    
118      // See also Image_Frame_Reflower::get_min_max_width
                    
119      // Tested php ver: value measured in px, suffix "px" not in value: rtrim unnecessary.
                    
120      //$w = $frame->get_width();
                    
                
testsuite.php https://github.com/bb-dev/cakephp2x.git | PHP | 376 lines
                    
8 *
                    
9 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
                    
10 * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @copyright     Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
16 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
                    
17 * @package       cake
                    
18 * @subpackage    cake.cake.console.libs
                    
19 * @since         CakePHP(tm) v 1.2.0.4433
                    
20 * @license       http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
                    
228			case 'case':
                    
229				if ($this->category == 'app' && file_exists($folder.DS.'cases'.DS.$this->file.'.test.php')) {
                    
230					return true;
                    
231				}
                    
232				$coreCaseExists = file_exists($folder.DS.'cases'.DS.$this->file.'.test.php');
                    
233				$coreLibCaseExists = file_exists($folder.DS.'cases'.DS.'libs'.DS.$this->file.'.test.php');
                    
                
Filesystem.php https://github.com/mamayoleksandr/xtbackup.git | PHP | 317 lines
                    
1<?php
                    
2class Storage_Filesystem implements Storage_Interface
                    
54        $this->_baseDir = $this->_options['basedir']; // for faster access
                    
55        $this->_baseDir = rtrim($this->_baseDir, '/'). '/';
                    
56        $this->_isWindows = (strpos(strtolower(php_uname('s')), 'win') !== false);
                    
165            //initialize windows's FileSystemObject
                    
166            /** @noinspection PhpUndefinedClassInspection, PhpUndefinedConstantInspection */
                    
167            $fso = new COM('Scripting.FileSystemObject', null, CP_UTF8);
                    
176            //see Scripting.FileSystemObject on http://msdn.microsoft.com
                    
177            /** @noinspection PhpUndefinedMethodInspection */
                    
178            $folder = $fso->GetFolder($curDir);
                    
                
index.php https://github.com/robeendey/ce.git | PHP | 193 lines
                    
3 * @package     Engine_Core
                    
4 * @version     $Id: index.php 7539 2010-10-04 04:41:38Z john $
                    
5 * @copyright   Copyright (c) 2008 Webligo Developments
                    
11  $target = null;
                    
12  if( empty($_GET['rewrite']) && $_SERVER['PHP_SELF'] != parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ) {
                    
13    $target = $_SERVER['PHP_SELF'];
                    
19  } else if( isset($_GET['rewrite']) && $_GET['rewrite'] == 2 ) {
                    
20    //$target = dirname($_SERVER['PHP_SELF']);
                    
21    $target = preg_replace('/\/index\.php\/?/i', '/', $_SERVER['REQUEST_URI']);
                    
64// get general config
                    
65if( file_exists(APPLICATION_PATH_SET . DS . 'general.php') ) {
                    
66  $generalConfig = include APPLICATION_PATH_SET . DS . 'general.php';
                    
93if( !file_exists(APPLICATION_PATH_SET . DS . 'database.php') ) {
                    
94  header('Location: ' . rtrim((string)constant('_ENGINE_R_BASE'), '/') . '/install/index.php');
                    
95  exit();
                    
                
Userguide.php git://github.com/kohana/userguide.git | PHP | 398 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
105		// Trim trailing slash
                    
106		$page = rtrim($page, '/');
                    
107
                    
289				$media->uri(array('file' => 'js/shCore.js')),
                    
290				$media->uri(array('file' => 'js/shBrushPhp.js')),
                    
291			);
                    
                
Sql.php https://github.com/kinncj/Relational.git | PHP | 195 lines
                    
1<?php
                    
2
                    
70    {
                    
71        $q = rtrim($this->query);
                    
72        $this->query = '';
                    
                
class-wc-cli-runner.php https://gitlab.com/campus-academy/krowkaramel | PHP | 254 lines
                    
1<?php
                    
2/**
                    
128			$resource_id   = ! empty( $matches[0] ) ? array_pop( $matches[0] ) : null;
                    
129			$trimmed_route = rtrim( $route );
                    
130			$is_singular   = substr( $trimmed_route, - strlen( $resource_id ) ) === $resource_id;
                    
                
ezplanguageswitcher.php https://github.com/eeggenberger/ezpublish.git | PHP | 248 lines
                    
1<?php
                    
2/**
                    
156
                    
157        $this->baseDestinationUrl = rtrim( $this->baseDestinationUrl, '/' );
                    
158
                    
                
sql.inc.php https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework | PHP | 238 lines
                    
1<?php
                    
2if (!$error && $_POST["export"]) {
                    
74				} else {
                    
75					if (!$found && rtrim($query) == "") {
                    
76						break;
                    
79
                    
80					if ($found && rtrim($found) != $delimiter) { // find matching quote or comment end
                    
81						while (preg_match('(' . ($found == '/*' ? '\\*/' : ($found == '[' ? ']' : (preg_match('~^-- |^#~', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', $query, $match, PREG_OFFSET_CAPTURE, $offset)) { //! respect sql_mode NO_BACKSLASH_ESCAPES
                    
186<form action="" method="post" enctype="multipart/form-data" id="form">
                    
187<?php
                    
188$execute = "<input type='submit' value='" . lang('Execute') . "' title='Ctrl+Enter'>";
                    
                
functions.php https://gitlab.com/reasonat/test8 | PHP | 329 lines
                    
1<?php
                    
2namespace GuzzleHttp;
                    
51            // normalize float vs double
                    
52            return str_replace('double(', 'float(', rtrim(ob_get_clean()));
                    
53    }
                    
91
                    
92    return fopen('php://output', 'w');
                    
93}
                    
139        }
                    
140        $defaultAgent .= ' PHP/' . PHP_VERSION;
                    
141    }
                    
295 * @throws \InvalidArgumentException if the JSON cannot be decoded.
                    
296 * @link http://www.php.net/manual/en/function.json-decode.php
                    
297 */
                    
317 * @throws \InvalidArgumentException if the JSON cannot be encoded.
                    
318 * @link http://www.php.net/manual/en/function.json-encode.php
                    
319 */
                    
                
AdminShipping.php http://marocmall.googlecode.com/svn/trunk/ | PHP | 306 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*  @version  Release: $Revision: 8861 $
                    
24*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25*  International Registered Trademark & Property of PrestaShop SA
                    
111							}
                    
112						$priceList = rtrim($priceList, ',');
                    
113						/* Update delivery prices */
                    
                
ListClassFunction.filter.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 150 lines
                    
17 * @copyright  2004-2006 Claudio Bustos
                    
18 * @link     http://pear.php.net/package/PHP_Beautifier
                    
19 * @link     http://beautifyphp.sourceforge.net
                    
19 * @link     http://beautifyphp.sourceforge.net
                    
20 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
21 * @version    CVS: $Id:$
                    
39 * @copyright  2004-2006 Claudio Bustos
                    
40 * @link     http://pear.php.net/package/PHP_Beautifier
                    
41 * @link     http://beautifyphp.sourceforge.net
                    
41 * @link     http://beautifyphp.sourceforge.net
                    
42 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
43 * @version    Release: 0.1.14
                    
44 */
                    
45class PHP_Beautifier_Filter_ListClassFunction extends PHP_Beautifier_Filter
                    
46{
                    
                
SynapseClient.php https://gitlab.com/kamata4649/genisys | PHP | 220 lines
                    
1<?php
                    
2namespace synapse\network\synlib;
                    
161	public function cleanPath($path){
                    
162		return rtrim(str_replace(["\\", ".php", "phar://", rtrim(str_replace(["\\", "phar://"], ["/", ""], $this->mainPath), "/")], ["/", "", "", ""], $path), "/");
                    
163	}
                    
                
login.class.php https://github.com/francisreboucas/revolution.git | PHP | 248 lines
                    
1<?php
                    
2/**
                    
151                $url = !empty($this->scriptProperties['returnUrl']) ? $this->scriptProperties['returnUrl'] : $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
                    
152                $this->modx->sendRedirect(rtrim($url,'/'),'','','full');
                    
153            } else {
                    
200
                    
201            $this->modx->getService('mail', 'mail.modPHPMailer');
                    
202            $this->modx->mail->set(modMail::MAIL_BODY, $message);
                    
                
files.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 306 lines
                    
3 *
                    
4 * This file is part of phpFastCache.
                    
5 *
                    
17use phpFastCache\Core\DriverAbstract;
                    
18use phpFastCache\Exceptions\phpFastCacheDriverException;
                    
19
                    
29     * @param array $config
                    
30     * @throws phpFastCacheDriverException
                    
31     */
                    
37        if (!$this->checkdriver() && !isset($config[ 'skipError' ])) {
                    
38            throw new phpFastCacheDriverException("Can't use this driver for your website!");
                    
39        }
                    
58     * @return string
                    
59     * @throws phpFastCacheDriverException
                    
60     */
                    
                
CodeFile.php https://gitlab.com/isdzulqor/Slis-Dev | PHP | 194 lines
                    
1<?php
                    
2/**
                    
19 * read-only.
                    
20 * @property string $type The code file extension (e.g. php, txt). This property is read-only.
                    
21 *
                    
116    /**
                    
117     * @return string the code file extension (e.g. php, txt)
                    
118     */
                    
140
                    
141        if ($type === 'php') {
                    
142            return highlight_string($this->content, true);
                    
182        foreach ($lines1 as $i => $line) {
                    
183            $lines1[$i] = rtrim($line, "\r\n");
                    
184        }
                    
185        foreach ($lines2 as $i => $line) {
                    
186            $lines2[$i] = rtrim($line, "\r\n");
                    
187        }
                    
                
cache_files_cleaner.php https://gitlab.com/neuser/bitrix-core | PHP | 324 lines
                    
147		}
                    
148		elseif(mb_substr($FileName, -4) == ".php")
                    
149		{
                    
298	{
                    
299		$dir = rtrim($dir, "/");
                    
300		if(is_dir($dir))
                    
                
helper_dir.php https://github.com/syfisher/limb.git | PHP | 174 lines
                    
1<?php
                    
2
                    
9  * @copyright 2010 KCFinder Project
                    
10  *   @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
                    
11  *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
                    
16
                    
17  /** Checks if the given directory is really writable. The standard PHP
                    
18    * function is_writable() does not work properly on Windows servers
                    
114
                    
115        if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN")
                    
116            $dir = str_replace("\\", "/", $dir);
                    
116            $dir = str_replace("\\", "/", $dir);
                    
117        $dir = rtrim($dir, "/");
                    
118
                    
                
io.php https://bitbucket.org/frchico/chamilo_openshift.git | PHP | 342 lines
                    
1<?php
                    
2/*
                    
21 *
                    
22 * This is the File Manager Connector for PHP.
                    
23
                    
118
                    
119		$php_errormsg = '' ;
                    
120		// Enable error tracking to catch the error.
                    
163
                    
164		$sErrorMsg = $php_errormsg ;
                    
165
                    
194	if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) )
                    
195		SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ;
                    
196
                    
315
                    
316	$sNewFileName = php2phps( $sNewFileName ) ;
                    
317
                    
                
SYLK.php https://gitlab.com/Abubakker/web_apps_php_26 | PHP | 450 lines
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
44 */
                    
45class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
                    
46{
                    
213	/**
                    
214	 * Loads PHPExcel from file into PHPExcel instance
                    
215	 *
                    
216	 * @param 	string 		$pFilename
                    
217	 * @param	PHPExcel	$objPHPExcel
                    
218	 * @return 	PHPExcel
                    
220	 */
                    
221	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
                    
222	{
                    
                
utils.php https://gitlab.com/Rad1calDreamer/honey | PHP | 225 lines
                    
6		$arServices = Array();
                    
7		include($servicePath.".services.php");
                    
8
                    
116				$arTemplate = Array();
                    
117				if (is_file($themePath."/".$file."/description.php"))
                    
118					@include($themePath."/".$file."/description.php");
                    
151
                    
152		$path = rtrim($path, "/");
                    
153
                    
168		$PERM = Array();
                    
169		if(file_exists($documentRoot.$pathDir."/.access.php"))
                    
170			@include($documentRoot.$pathDir."/.access.php");
                    
213		global $DBType;
                    
214		require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/classes/".strtolower($DBType)."/favorites.php");
                    
215
                    
                
Database.php https://github.com/ckdimka/core.git | PHP | 419 lines
                    
1<?php
                    
2// vim: set ts=4 sw=4 sts=4 et:
                    
11 * It is also available through the world-wide-web at this URL:
                    
12 * http://opensource.org/licenses/osl-3.0.php
                    
13 * If you did not receive a copy of the license and are unable to
                    
16 *
                    
17 * PHP version 5.3.0
                    
18 *
                    
21 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved
                    
22 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
                    
23 * @link      http://www.litecommerce.com/
                    
365
                    
366                } while (substr($c, $endPos) != PHP_EOL && !feof($fp));
                    
367
                    
367
                    
368                $c = rtrim($c);
                    
369
                    
                
filebrowser.php https://bitbucket.org/chiamingyen/cmsimple-and-plugins.git | PHP | 431 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @version $Id: filebrowser.php 292 2012-09-21 16:24:11Z cmb69 $
                    
5 */
                    
78
                    
79        $this->baseDirectories['images'] = rtrim($cf['folders']['images'], '/') . '/';
                    
80        $this->baseDirectories['downloads'] = rtrim($cf['folders']['downloads'], '/') . '/';
                    
80        $this->baseDirectories['downloads'] = rtrim($cf['folders']['downloads'], '/') . '/';
                    
81        $this->baseDirectories['userfiles'] = rtrim($cf['folders']['userfiles'], '/') . '/';
                    
82        $this->baseDirectories['media'] = rtrim($cf['folders']['media'], '/') . '/';
                    
250// 設法在 Windows 能夠儲存中文命名檔案
                    
251if (substr(php_uname(), 0, 7) == "Windows")
                    
252{
                    
307// 設法在 Windows 能夠儲存中文命名檔案
                    
308if (substr(php_uname(), 0, 7) == "Windows")
                    
309{
                    
                
Container.php https://github.com/DocAl/mockery.git | PHP | 322 lines
                    
1<?php
                    
2/**
                    
12 * obtain it through the world-wide-web, please send an email
                    
13 * to padraic@php.net so we can send you a copy immediately.
                    
14 *
                    
116                $parts[1] = str_replace(' ','', $parts[1]);
                    
117                $partialMethods = explode(',', strtolower(rtrim($parts[1], ']')));
                    
118                array_shift($args);
                    
                
smarty_internal_cacheresource_file.php https://gitlab.com/staging06/myproject | PHP | 300 lines
                    
1<?php
                    
2/**
                    
56            if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_cache_dir)) {
                    
57                $_lock_dir = rtrim(getcwd(), '/\\') . DS . $_cache_dir;
                    
58            } else {
                    
62        }
                    
63        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
                    
64        $cached->timestamp = @filemtime($cached->filepath);
                    
196            foreach ($_cache as $_file) {
                    
197				if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, 'index.php') !== false) {
                    
198                    continue;
                    
262    {
                    
263        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
264            clearstatcache(true, $cached->lock_id);
                    
                
Subversion.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 406 lines
                    
1<?php
                    
2
                    
83	 * existed since version 0.3 of the Pecl extension (per release notes).
                    
84	 * Nobody ever bothered filling in the documentation on php.net though.
                    
85	 * The function returns a big array of a bunch of info about the repository
                    
208		foreach ( $lines as $line ) {
                    
209			$line = rtrim( $line );
                    
210
                    
                
CaptureCache.php https://gitlab.com/faisaliqbal/mytripsorter | PHP | 387 lines
                    
1<?php
                    
2/**
                    
31
                    
32            // http://php.net/manual/function.ob-start.php
                    
33            // -> If output_callback  returns FALSE original input is sent to the browser.
                    
222        if (substr($pageId, -1) == '/') {
                    
223            $path = rtrim($pageId, '/');
                    
224        } else {
                    
                
ical.php https://bitbucket.org/anneivycat/ebcookhouse.git | PHP | 133 lines
                    
1<?php
                    
2
                    
59	}
                    
60	$categories = rtrim($categories, ',');
                    
61	$action = strpbrk($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'] . "&iCal=true" : $_SERVER['REQUEST_URI'] . "?iCal=true";
                    
105	}
                    
106	$categories = rtrim($categories, ',');
                    
107	$action = strpbrk($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'] . "&iCal=true" : $_SERVER['REQUEST_URI'] . "?iCal=true";
                    
                
Loader.php https://bitbucket.org/timgws/full-text-rss.git | PHP | 329 lines
                    
40     * generate a path hierarchy (e.g., "Zend_Example_Class" will map
                    
41     * to "Zend/Example/Class.php").
                    
42     *
                    
43     * If the file was not found in the $dirs, or if no $dirs were specified,
                    
44     * it will attempt to load it from PHP's include_path.
                    
45     *
                    
97        if (!class_exists($class, false) && !interface_exists($class, false)) {
                    
98            require_once 'Zend/Exception.php';
                    
99            throw new Zend_Exception("File \"$file\" does not exist or class \"$class\" was not found in the file");
                    
103    /**
                    
104     * Loads a PHP file.  This is a wrapper for PHP's include() function.
                    
105     *
                    
162     * Returns TRUE if the $filename is readable, or FALSE otherwise.
                    
163     * This function uses the PHP include_path, where PHP's is_readable()
                    
164     * does not.
                    
                
url.php https://github.com/bet0x/forkcms.git | PHP | 472 lines
                    
1<?php
                    
2
                    
300				// build URL
                    
301				$URL = rtrim('/' . $language . '/' . $this->getQueryString(), '/');
                    
302
                    
                
Resource.php https://bitbucket.org/acidel/buykoala.git | PHP | 460 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: Resource.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24#require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            #require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            #require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
118            if (!$this->hasResourceType($type)) {
                    
119                #require_once 'Zend/Loader/Exception.php';
                    
120                throw new Zend_Loader_Exception("Invalid resource type $type; cannot load resource");
                    
                
shadow_plugin_framework.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 341 lines
                    
1<?php
                    
2
                    
7 
                    
8//Load JSON functions for PHP < 5.2
                    
9if ( !(function_exists('json_encode') && function_exists('json_decode')) && !(class_exists('Services_JSON') || class_exists('Moxiecode_JSON')) ){
                    
9if ( !(function_exists('json_encode') && function_exists('json_decode')) && !(class_exists('Services_JSON') || class_exists('Moxiecode_JSON')) ){
                    
10	$class_json_path = ABSPATH.WPINC.'/class-json.php';
                    
11	$class_moxiecode_json_path = ABSPATH.WPINC.'/js/tinymce/plugins/spellchecker/classes/utils/JSON.php';
                    
58		
                    
59		$this->plugin_dir_url = rtrim(plugin_dir_url($this->plugin_file), '/');
                    
60
                    
                
text_helper.php https://gitlab.com/pollux1er/PerencoCanteenAdmin | PHP | 564 lines
                    
324		 * Also replace any existing PHP tags to temporary markers
                    
325		 * so they don't accidentally break the string out of PHP,
                    
326		 * and thus, thwart the highlighting.
                    
329			array('&lt;', '&gt;', '<?', '?>', '<%', '%>', '\\', '</script>'),
                    
330			array('<', '>', 'phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
                    
331			$str
                    
337
                    
338		// Remove our artificially added PHP, and the syntax highlighting that came with it
                    
339		$str = preg_replace(
                    
340			array(
                    
341				'/<span style="color: #([A-Z0-9]+)">&lt;\?php(&nbsp;| )/i',
                    
342				'/(<span style="color: #[A-Z0-9]+">.*?)\?&gt;<\/span>\n<\/span>\n<\/code>/is',
                    
354		return str_replace(
                    
355			array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
                    
356			array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\', '&lt;/script&gt;'),
                    
                
Sitemap.php https://github.com/MontmereLimited/zf2.git | PHP | 460 lines
                    
1<?php
                    
2/**
                    
37 *
                    
38 * @link http://www.sitemaps.org/protocol.php
                    
39 *
                    
291            $curDoc         = ('/' == $curDoc) ? '' : trim($curDoc, '/');
                    
292            $url            = rtrim($this->getServerUrl(), '/') . '/'
                    
293                            . $curDoc
                    
457
                    
458        return rtrim($xml, PHP_EOL);
                    
459    }
                    
                
Pagination.php https://bitbucket.org/earnest-tekkies/sample-php-ci.git | PHP | 357 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 *
                    
218		{
                    
219			$this->base_url = rtrim($this->base_url).'&amp;'.$this->query_string_segment.'=';
                    
220		}
                    
222		{
                    
223			$this->base_url = rtrim($this->base_url, '/') .'/';
                    
224		}
                    
355
                    
356/* End of file Pagination.php */
                    
357/* Location: ./system/libraries/Pagination.php */
                    
                
ebooks.blade.php https://gitlab.com/DhanapalRudram/Maritime_Managers | PHP | 212 lines
                    
88     <ul>
                    
89         <?php  $path=url()->current();
                    
90              $da=end((explode('/', rtrim($path, '/'))));
                    
                
Controller.php https://gitlab.com/rsilveira1987/Expresso | PHP | 184 lines
                    
1<?php
                    
2/**
                    
152        if ($adapter['adapter'] == 'owncloud') {
                    
153            $url = rtrim($url, '/');
                    
154            $url .= '/remote.php/webdav/';
                    
                
SYLK.php https://gitlab.com/dmsapiens/physicians | PHP | 469 lines
                    
22 * @package    PHPExcel_Reader
                    
23 * @copyright  Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
42 * @package    PHPExcel_Reader
                    
43 * @copyright  Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
44 */
                    
44 */
                    
45class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
                    
46{
                    
230	/**
                    
231	 * Loads PHPExcel from file into PHPExcel instance
                    
232	 *
                    
                
cog_fonctions.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 327 lines
                    
1<?php
                    
2/*
                    
18		$config = unserialize($GLOBALS['meta']['cog']);
                    
19		$config_chemin = rtrim($config['chemin_donnee'],'/').'/';
                    
20	}
                    
                
DirectFilesystem.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 500 lines
                    
1<?php
                    
2
                    
5 *
                    
6 * @file DirectFilesystem.php
                    
7 * @ingroup Deployment
                    
17/**
                    
18 * Filesystem class for direct PHP file and folder manipulation.
                    
19 * 
                    
66		// Recursive approach required.
                    
67		$file = rtrim( $file, '/' ) . '/';
                    
68		$files = $this->listDir( $file );
                    
102		// Recursive approach required.
                    
103		$file = rtrim( $file, '/' ) . '/';
                    
104		$files = $this->listDir( $file );
                    
129		// Recursive approach required.
                    
130		$file = rtrim( $file, '/' ) . '/';
                    
131		$files = $this->listDir( $file );
                    
                
smarty_internal_cacheresource_file.php https://gitlab.com/adamlwalker/generatedata | PHP | 264 lines
                    
1<?php
                    
2/**
                    
56            if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_cache_dir)) {
                    
57                $_lock_dir = rtrim(getcwd(), '/\\') . DS . $_cache_dir;
                    
58            } else {
                    
62        }
                    
63        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
                    
64        $cached->timestamp = @filemtime($cached->filepath);
                    
229    {
                    
230        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                    
231            clearstatcache(true, $cached->lock_id);
                    
                
KLogger.php https://github.com/denheck/KLogger.git | PHP | 395 lines
                    
1<?php
                    
2
                    
98    /**
                    
99     * Valid PHP date() format string for log timestamps
                    
100     * @var string
                    
153    {
                    
154        $logDirectory = rtrim($logDirectory, '\\/');
                    
155
                    
                
PrettyPrinterAbstract.php https://gitlab.com/rocs/Streaming-Safe-for-Kids | PHP | 316 lines
                    
1<?php
                    
2
                    
2
                    
3namespace PhpParser;
                    
4
                    
4
                    
5use PhpParser\Node\Expr;
                    
6use PhpParser\Node\Stmt;
                    
123    /**
                    
124     * Pretty prints a file of statements (includes the opening <?php tag if it is required).
                    
125     *
                    
131        if (!$stmts) {
                    
132            return "<?php\n\n";
                    
133        }
                    
140        if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) {
                    
141            $p = preg_replace('/<\?php$/', '', rtrim($p));
                    
142        }
                    
                
Database.php https://gitlab.com/yousafsyed/easternglamor | PHP | 336 lines
                    
1<?php
                    
2/**
                    
293        if ($this->checkDbUsage()) {
                    
294            $path = rtrim(str_replace(['\\', '/'], '/', $result['path']), '/');
                    
295            $file = '/' . ltrim($result['file'], '\\/');
                    
331            $mediaDir = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
                    
332            $this->_mediaBaseDirectory = rtrim($mediaDir, '/');
                    
333        }
                    
                
Resource.php https://bitbucket.org/openfisma-ondemand/openfisma.git | PHP | 472 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Loader_Autoloader_Interface */
                    
24// require_once 'Zend/Loader/Autoloader/Interface.php';
                    
25
                    
73        if (!is_array($options)) {
                    
74            // require_once 'Zend/Loader/Exception.php';
                    
75            throw new Zend_Loader_Exception('Options must be passed to resource loader constructor');
                    
83        ) {
                    
84            // require_once 'Zend/Loader/Exception.php';
                    
85            throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization');
                    
90        }
                    
91        // require_once 'Zend/Loader/Autoloader.php';
                    
92        Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace);
                    
119            if (!$this->hasResourceType($type)) {
                    
120                // require_once 'Zend/Loader/Exception.php';
                    
121                throw new Zend_Loader_Exception("Invalid resource type $type; cannot load resource");
                    
                
Form.php https://gitlab.com/Sigpot/AirSpot | PHP | 473 lines
                    
1<?php
                    
2
                    
132    /**
                    
133     * Gets the field values as PHP.
                    
134     *
                    
135     * This method converts fields with the array notation
                    
136     * (like foo[bar] to arrays) like PHP does.
                    
137     *
                    
139     */
                    
140    public function getPhpValues()
                    
141    {
                    
155    /**
                    
156     * Gets the file field values as PHP.
                    
157     *
                    
158     * This method converts fields with the array notation
                    
159     * (like foo[bar] to arrays) like PHP does.
                    
160     * The returned array is consistent with the array for field values
                    
                
Loader.php https://github.com/bhaumik25/zend-framework.git | PHP | 298 lines
                    
1<?php
                    
2/**
                    
43     * Loads a class from a PHP file.  The filename must be formatted
                    
44     * as "$class.php".
                    
45     *
                    
53     * If the file was not found in the $dirs, or if no $dirs were specified,
                    
54     * it will attempt to load it from PHP's include_path.
                    
55     *
                    
68        if ((null !== $dirs) && !is_string($dirs) && !is_array($dirs)) {
                    
69            require_once 'Zend/Exception.php';
                    
70            throw new Zend_Exception('Directory argument must be a string or an array');
                    
102    /**
                    
103     * Loads a PHP file.  This is a wrapper for PHP's include() function.
                    
104     *
                    
161     * Returns TRUE if the $filename is readable, or FALSE otherwise.
                    
162     * This function uses the PHP include_path, where PHP's is_readable()
                    
163     * does not.
                    
                
TextDataTest.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 365 lines
                    
12        {
                    
13            define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
                    
14        }
                    
14        }
                    
15        require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
16
                    
16
                    
17        PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
                    
18	}
                    
58		$expectedResult = array_pop($args);
                    
59		$result = call_user_func_array(array('PHPExcel_Calculation_TextData','CONCATENATE'),$args);
                    
60		$this->assertEquals($expectedResult, $result);
                    
202		$expectedResult = array_pop($args);
                    
203		$result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'),$args);
                    
204		$this->assertEquals($expectedResult, $result);
                    
                
book.php https://bitbucket.org/neoessentia/ensenas-web.git | PHP | 158 lines
                    
32        <div class="back-home">
                    
33          <a class="btn btn-success" href="index.php" title="Regresar">
                    
34            <i class="icon-regresar"></i>
                    
41            <!-- elementos de prueba -->
                    
42            <?php
                    
43			$archivo = "contador/categoria.txt";
                    
51							
                    
52					$num_palabras = rtrim($palabras[$posicion]);
                    
53					$posicion++;
                    
56							
                    
57						$linea = rtrim($palabras[$posicion]);
                    
58						$palabra = utf8_encode( substr($linea,0, stripos($linea, ',') ));
                    
63						
                    
64						//echo "<OPTION><a href='control.php?id=".$link."&band=true' style='font-size:15px'>".$palabra."</a></OPTION>";
                    
65						
                    
                
wc-formatting-functions.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 607 lines
                    
1<?php
                    
2/**
                    
157	// @codeCoverageIgnoreStart
                    
158	if ( version_compare( phpversion(), '5.3', '<' ) ) {
                    
159		$tax = round( $tax, $dp );
                    
203	if ( $trim_zeros && strstr( $number, '.' ) ) {
                    
204		$number = rtrim( rtrim( $number, '0' ), '.' );
                    
205	}
                    
210/**
                    
211 * Convert a float to a string without locale formatting which PHP adds when changing floats to strings
                    
212 * @param  float $float
                    
236/**
                    
237 * Format a decimal with PHP Locale settings
                    
238 * @param  string $value
                    
402 *
                    
403 * Adapted from http://www.php.net/manual/en/function.timezone-name-from-abbr.php#89155
                    
404 *
                    
                
ClassCollectionLoader.php https://gitlab.com/Isaki/le331.fr | PHP | 370 lines
                    
1<?php
                    
2
                    
36     */
                    
37    public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
                    
38    {
                    
38    {
                    
39        // each $name can only be loaded once per PHP process
                    
40        if (isset(self::$loaded[$name])) {
                    
104
                    
105            $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName()));
                    
106
                    
111
                    
112            $c = self::fixNamespaceDeclarations('<?php '.$c);
                    
113            $c = preg_replace('/^\s*<\?php/', '', $c);
                    
121        }
                    
122        self::writeCacheFile($cache, '<?php '.$content);
                    
123
                    
                
Inline.php https://github.com/nguyennamtien/TaskBoxx.git | PHP | 403 lines
                    
1<?php
                    
2
                    
22    /**
                    
23     * Converts a YAML string to a PHP array.
                    
24     *
                    
26     *
                    
27     * @return array A PHP array representing the YAML string
                    
28     */
                    
60    /**
                    
61     * Dumps a given PHP variable to a YAML string.
                    
62     *
                    
62     *
                    
63     * @param mixed $value The PHP variable to convert
                    
64     *
                    
64     *
                    
65     * @return string The YAML string representing the PHP array
                    
66     *
                    
                
pico.php https://gitlab.com/Blueprint-Marketing/Pico | PHP | 402 lines
                    
1<?php
                    
2
                    
33        $request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
                    
34        $script_url = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : '';
                    
35
                    
37        if ($request_url != $script_url) {
                    
38            $url = trim(preg_replace('/' . str_replace('/', '\/', str_replace('index.php', '', $script_url)) . '/', '',
                    
39                $request_url, 1), '/');
                    
101            'config' => $settings,
                    
102            'base_dir' => rtrim(ROOT_DIR, '/'),
                    
103            'base_url' => $settings['base_url'],
                    
128        $this->plugins = array();
                    
129        $plugins = $this->get_files(PLUGINS_DIR, '.php');
                    
130        if (!empty($plugins)) {
                    
325        $request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
                    
326        $script_url = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : '';
                    
327        if ($request_url != $script_url) {
                    
                
ajax.step2.php https://gitlab.com/sokeara/Tribal_Education | PHP | 279 lines
                    
32$_POST['path_new'] = isset($_POST['path_new']) ? trim($_POST['path_new']) : null;
                    
33$_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '/') : null;
                    
34$_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
                    
35$_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
                    
36$_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
                    
37
                    
103		array('search' => urlencode($_POST['url_old']),  'replace' => urlencode($_POST['url_new'])),
                    
104		array('search' => rtrim(DUPX_Util::unset_safe_path($_POST['path_old']), '\\'), 'replace' => rtrim($_POST['path_new'], '/'))
                    
105);
                    
107//Remove trailing slashes
                    
108function _dupx_array_rtrim(&$value) {
                    
109    $value = rtrim($value, '\/');
                    
110}
                    
111array_walk_recursive($GLOBALS['REPLACE_LIST'], _dupx_array_rtrim);
                    
112
                    
                
cache.php https://github.com/mariuz/firetube.git | PHP | 329 lines
                    
1<?php
                    
2/* SVN FILE: $Id$ */
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
7 *
                    
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
9 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @link          http://cakephp.org CakePHP(tm) Project
                    
16 * @package       cake
                    
17 * @subpackage    cake.cake.libs.view.helpers
                    
18 * @since         CakePHP(tm) v 1.0.0.2277
                    
19 * @version       $Revision$
                    
21 * @lastmodified  $Date$
                    
22 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
                    
23 */
                    
                
SqlitePlatform.php https://github.com/l3l0/BehatExamples.git | PHP | 469 lines
                    
1<?php
                    
2/*
                    
81        } else if($pos == self::TRIM_TRAILING) {
                    
82            $trimFn = 'RTRIM';
                    
83        } else {
                    
                
COciTest.php https://gitlab.com/RECITEC/yii | PHP | 378 lines
                    
1<?php
                    
2
                    
86				if(mb_substr($sql, -4)!=='END;') // do not remove semicolons after BEGIN END blocks
                    
87					$sql=rtrim($sql, ';');
                    
88				$this->db->createCommand($sql)->execute();
                    
                
WebBrowser.php https://github.com/wzs/Scrappr.git | PHP | 405 lines
                    
5 */
                    
6class phpQueryObjectPlugin_WebBrowser {
                    
7	/**
                    
15	 *
                    
16	 * @param phpQueryObject $self
                    
17	 * @todo support 'reset' event
                    
154			);
                    
155//			phpQuery::callbackRun($callback, array(
                    
156//				self::browserReceive($xhr)//->WebBrowser($callback)
                    
173		self::authorizeHost($ajaxSettings['url']);
                    
174		$xhr = phpQuery::ajax(
                    
175			self::ajaxSettingsPrepare($ajaxSettings)
                    
323 * @return unknown
                    
324 * @link http://www.php.net/manual/en/function.parse-url.php
                    
325 * @author stevenlewis at hotmail dot com
                    
                
Curl.class.php https://gitlab.com/fangjianwei/weifenxiao | PHP | 186 lines
                    
1<?php
                    
2/**
                    
109    	}    	
                    
110    	return rtrim($str,';');
                    
111    }
                    
                
functions.php https://gitlab.com/i-have-a-green/digitemis-v3 | PHP | 334 lines
                    
1<?php
                    
2namespace GuzzleHttp;
                    
51            // normalize float vs double
                    
52            return str_replace('double(', 'float(', rtrim(ob_get_clean()));
                    
53    }
                    
91
                    
92    return fopen('php://output', 'w');
                    
93}
                    
139        }
                    
140        $defaultAgent .= ' PHP/' . PHP_VERSION;
                    
141    }
                    
298 * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
                    
299 * @link http://www.php.net/manual/en/function.json-decode.php
                    
300 */
                    
321 * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
                    
322 * @link http://www.php.net/manual/en/function.json-encode.php
                    
323 */
                    
                
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.
                    
72
                    
73  if ( php_sapi_name() !== "cli")
                    
74    echo("</pre>");
                    
118  if ( mb_strlen($url) == 0 ) {
                    
119    //return $protocol . $host . rtrim($base_path, "/\\") . "/";
                    
120    return $protocol . $host . $base_path;
                    
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 */
                    
                
test.php https://github.com/jasoneh/SMS-Can-.git | PHP | 188 lines
                    
9 *
                    
10 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
                    
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
18 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
                    
19 * @package       cake
                    
92if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
                    
93	trigger_error("CakePHP core could not be found.  Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
                    
94}
                    
138	$analyzeCodeCoverage = true;
                    
139	require_once CAKE_TESTS_LIB . 'code_coverage_manager.php';
                    
140	if (!extension_loaded('xdebug')) {
                    
141		CakePHPTestHeader();
                    
142		include CAKE_TESTS_LIB . 'xdebug.php';
                    
143		CakePHPTestSuiteFooter();
                    
                
userpay.php https://bitbucket.org/johnroyer/phpwind8.7.git | PHP | 437 lines
                    
36	$paycredit = key($db_creditpay);
                    
37	$pay_link = "<span class=\"btn\"><span><button onClick=\"location.href='userpay.php?action=buy';\">馬上充值</button></span></span>";
                    
38	//* include_once pwCache::getPath(D_P.'data/bbscache/ol_config.php');
                    
118			'currency_code'	=> 'CNY',
                    
119			'bn'			=> 'phpwind',
                    
120			'charset'		=> $db_charset
                    
141		strlen($ol_99bill) == 11 && $ol_99bill .= '01';
                    
142		//require_once(R_P.'require/header.php');
                    
143		!$db_rmbrate && $db_rmbrate=10;
                    
145			'inputCharset'		=> ($db_charset == 'gbk' ? 2 : 1),
                    
146			'pageUrl'			=> "{$db_bbsurl}/pay99bill.php",
                    
147			'version'			=> 'v2.0',
                    
182//		$url  = "https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi?";
                    
183		$url  = "http://pay.phpwind.net/pay/create_payurl.php?";
                    
184		$para = array(
                    
                
AttachController.php https://gitlab.com/wuhang2003/phpwind | PHP | 403 lines
                    
1<?php
                    
2
                    
6 * @author Jianmin Chen <sky_hold@163.com>
                    
7 * @license http://www.phpwind.com
                    
8 * @version $Id: AttachController.php 28798 2013-05-24 06:20:13Z jieyin $
                    
59		if (1 == $this->loginUser->getPermission('allow_download') && $reduceDownload && $attach['cost']) {
                    
60			$dataShow = $lang->getMessage('BBS:thread.attachbuy.message.all', array('{buyCount}' =>-$attach['cost'].$creditBo->cType[$attach['ctype']], '{downCount}' => rtrim($reduceDownload, ',')));
                    
61		} elseif (1 == $this->loginUser->getPermission('allow_download') && $reduceDownload && !$attach['cost']) {
                    
61		} elseif (1 == $this->loginUser->getPermission('allow_download') && $reduceDownload && !$attach['cost']) {
                    
62			$dataShow = $lang->getMessage('BBS:thread.attachbuy.message.download', array('{downCount}' => rtrim($reduceDownload, ',')));
                    
63		} elseif ($attach['cost']) {
                    
                
graminfo.php https://github.com/Oreolek/Togataltu.git | PHP | 338 lines
                    
88 
                    
89abstract class phpMorphy_GramInfo implements phpMorphy_GramInfo_Interace {
                    
90    const HEADER_SIZE = 128;
                    
159        $len = ord($GLOBALS['__phpmorphy_substr']($headerRaw, $offset++, 1));
                    
160        $header['lang'] = rtrim($GLOBALS['__phpmorphy_substr']($headerRaw, $offset, $len));
                    
161        
                    
250
                    
251class phpMorphy_GramInfo_Proxy_WithHeader extends phpMorphy_GramInfo_Proxy {
                    
252    protected
                    
291
                    
292class phpMorphy_GramInfo_RuntimeCaching extends phpMorphy_GramInfo_Decorator {
                    
293    protected
                    
307
                    
308class phpMorphy_GramInfo_AncodeCache extends phpMorphy_GramInfo_Decorator {
                    
309    public
                    
                
WikitextContent.php https://gitlab.com/link233/bootmw | PHP | 371 lines
                    
1<?php
                    
2/**
                    
140		$pst = $wgParser->preSaveTransform( $text, $title, $user, $popts );
                    
141		rtrim( $pst );
                    
142
                    
                
string function.php https://gitlab.com/MHManik/MosharafHossain_SEIP136261_B34_Session4 | PHP | 248 lines
                    
1<?php
                    
2//explode ফাংশানের test
                    
2//explode ফাংশানের test
                    
3$str="php,Mysql,.net";
                    
4echo '<pre>';
                    
96echo '</br>';
                    
97// rtrim ফাংশান এর example. এখানে হবে কোন string এর পরে
                    
98
                    
99$str = "Hello World!    ";
                    
100echo "Without rtrim: " . $str;
                    
101echo "<br>";
                    
101echo "<br>";
                    
102echo "With rtrim: " . rtrim($str);
                    
103
                    
186//=========================================================================================================
                    
187//strip_tag ফাংশানটি কোন string থেকে html এবং php tag উঠিয়ে (strip) নেয়।
                    
188
                    
                
std.encryption.class.inc.php https://github.com/bejean/advanced-search-by-my-solr-server.git | PHP | 301 lines
                    
1<?php
                    
2// ******************************************************************************
                    
14// 		http://www.tonymarston.net/php-mysql/encryption.html
                    
15// 		http://www.tonymarston.net/php-mysql/showsource.php?file=encryption.php
                    
16
                    
53        // Use only printable characters from the ASCII table.
                    
54        // Do not use single quote, double quote or backslash as these have special meanings in PHP.
                    
55        // Each character can only appear once in each string.
                    
122
                    
123        return rtrim($target);
                    
124
                    
                
Database.php https://github.com/cosmocommerce/magento-mirror.git | PHP | 350 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) 2014 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
295    {
                    
296        $folderName = rtrim($folderName, '/');
                    
297        if (!strlen($folderName)) {
                    
                
MySqlGrammar.php https://gitlab.com/Sigpot/AirSpot | PHP | 257 lines
                    
1<?php
                    
2
                    
128
                    
129        $sql = rtrim("update {$table}{$joins} set $columns $where");
                    
130
                    
138
                    
139        return rtrim($sql);
                    
140    }
                    
                
file_helper.php https://gitlab.com/zanderwong/admin | PHP | 402 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 *
                    
112        // Trim the trailing slash
                    
113        $path = rtrim($path, DIRECTORY_SEPARATOR);
                    
114
                    
162                $_filedata = array();
                    
163                $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
                    
164            }
                    
204                $_filedata = array();
                    
205                $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
                    
206            }
                    
207
                    
208            // foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast
                    
209            while (FALSE !== ($file = readdir($fp))) {
                    
                
 

Source

Language