PageRenderTime 407ms queryFilters 0ms Sphinxql 155ms GetByIds 192ms meta 0ms repositoryFilters 10ms languageFilters 0ms sourceFilters 1ms

57,880 results for 'php strtr' (407 ms)

Source

Language

Repository

xml_saxy_parser.php git://github.com/gabrys/wikidot.git | PHP | 1,136 lines
1<?php
2/**
2/**
3* SAXY is a non-validating, but lightweight and fast SAX parser for PHP, modelled on the Expat parser
4* @package saxy-xmlparser
91
92//require_once(SAXY_INCLUDE_PATH . 'xml_saxy_shared.php');
93
274								if ($this->convertEntities && $maybeEntity) {
275								    $valueDump = strtr($valueDump, $this->predefinedEntities);
276									$valueDump = strtr($valueDump, $this->definedEntities);
298								if ($this->convertEntities && $maybeEntity) {
299								    $valueDump = strtr($valueDump, $this->predefinedEntities);
300									$valueDump = strtr($valueDump, $this->definedEntities);
366		if ($this->convertEntities && ((strpos($data, "&") != -1))) {
367			$data = strtr($data, $this->predefinedEntities);
368			$data = strtr($data, $this->definedEntities);
abstract_renderer.cls.php git://github.com/ceeram/CakePdf.git | PHP | 848 lines
1<?php
2/**
2/**
3 * DOMPDF - PHP5 HTML to PDF renderer
4 *
4 *
5 * File: $RCSfile: abstract_renderer.cls.php,v $
6 * Created on: 2004-06-01
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 *
52
53/* $Id: abstract_renderer.cls.php 216 2010-03-11 22:49:18Z ryan.masten $ */
54
lang.base.php git://github.com/xp-framework/xp-framework.git | PHP | 695 lines
8  final class xp {
9    const CLASS_FILE_EXT= '.class.php';
10
29        // If path is a directory and the included file exists, load it
30        if (is_dir($path) && file_exists($f= $path.DIRECTORY_SEPARATOR.strtr($class, '.', DIRECTORY_SEPARATOR).xp::CLASS_FILE_EXT)) {
31          $cl= 'FileSystemClassLoader';
31          $cl= 'FileSystemClassLoader';
32        } else if (is_file($path) && file_exists($f= 'xar://'.$path.'?'.strtr($class, '.', '/').xp::CLASS_FILE_EXT)) {
33          $cl= 'ArchiveClassLoader';
49        // Register class name and call static initializer if available
50        $name= ($package ? strtr($package, '.', '?').'?' : '').substr($class, (FALSE === ($p= strrpos($class, '.')) ? 0 : $p + 1));
51        xp::$registry['class.'.$name]= $class;
177        foreach (xp::$registry['classpath'] as $path) {
178          $filename= 'sapi'.DIRECTORY_SEPARATOR.strtr($name, '.', DIRECTORY_SEPARATOR).'.sapi.php';
179          if (is_dir($path) && file_exists($f= $path.DIRECTORY_SEPARATOR.$filename)) {
xml_saxy_parser.php git://github.com/newscloud/open-social-media-toolkit.git | PHP | 1,136 lines
1<?php
2/**
2/**
3* SAXY is a non-validating, but lightweight and fast SAX parser for PHP, modelled on the Expat parser
4* @package saxy-xmlparser
91
92//require_once(SAXY_INCLUDE_PATH . 'xml_saxy_shared.php');
93
274								if ($this->convertEntities && $maybeEntity) {
275								    $valueDump = strtr($valueDump, $this->predefinedEntities);
276									$valueDump = strtr($valueDump, $this->definedEntities);
298								if ($this->convertEntities && $maybeEntity) {
299								    $valueDump = strtr($valueDump, $this->predefinedEntities);
300									$valueDump = strtr($valueDump, $this->definedEntities);
366		if ($this->convertEntities && ((strpos($data, "&") != -1))) {
367			$data = strtr($data, $this->predefinedEntities);
368			$data = strtr($data, $this->definedEntities);
UniversalClassLoader.php git://github.com/amal/AzaThread.git | PHP | 341 lines
1<?php
2
5/**
6 * Implements a "universal" autoloader for PHP
7 *
9 *
10 *  * PSR-0 Standart. The technical interoperability standards for PHP 5.3 namespaces and
11 *    class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md);
12 *
13 *  * The PEAR naming convention for classes (http://pear.php.net/).
14 *
18 * @package system.AzaAutoloader
19 * @version $Id: UniversalClassLoader.php 3252 2012-04-09 21:53:00Z samally $
20 * @author  Amal Samally <amal.samally at gmail.com>
241	{
242		/** @noinspection PhpIncludeInspection */
243		return ($file = $this->findFile($class)) && require_once $file;
UserMailer.php git://pkgs.fedoraproject.org/mediawiki | PHP | 621 lines
1<?php
2/**
51	function toString() {
52		# PHP's mail() implementation under Windows is somewhat shite, and
53		# can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses,
97	 * array of parameters. It requires PEAR:Mail to do that.
98	 * Otherwise it just uses the standard PHP 'mail' function.
99	 *
118		if (is_array( $wgSMTP )) {
119			require_once( 'Mail.php' );
120
168			# In the following $headers = expression we removed "Reply-To: {$from}\r\n" , because it is treated differently
169			# (fifth parameter of the PHP mail function, see some lines below)
170
206			} else {
207				$wgErrorString = 'PHP is not configured to send mail';
208			}
Unicode.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 1,227 lines
1<?php
2
4*
5* Filename:     Unicode.php
6*
6*
7* Description:  Provides functions for handling Unicode strings in PHP without
8*               needing to configure the non-default mbstring extension
29*
30* License:      This file is part of the PHP JPEG Metadata Toolkit.
31*
31*
32*               The PHP JPEG Metadata Toolkit is free software; you can
33*               redistribute it and/or modify it under the terms of the
37*
38*               The PHP JPEG Metadata Toolkit is distributed in the hope
39*               that it will be useful, but WITHOUT ANY WARRANTY; without
function.strtr.html https://github.com/tsujita/dotfiles.git | HTML | 214 lines
11 <div class="up"><a href="ref.strings.html">String 関数</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13</div><hr /><div id="function.strtr" class="refentry">
15  <h1 class="refname">strtr</h1>
16  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">strtr</span> &mdash; <span class="dc-title">文字の変換あるいは部分文字列の置換を行う</span></p>
17
145<div class="phpcode"><code><span style="color: #000000">
146<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;この形式の場合、strtr()&nbsp;はバイト単位での変換を行います。<br />//&nbsp;したがって、ここではシングルバイトエンコーディングを想定しています。<br /></span><span style="color: #0000BB">$addr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #0000BB">$addr</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"äåö"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"aao"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
147</span>
162<div class="phpcode"><code><span style="color: #000000">
163<span style="color: #0000BB">&lt;?php<br />$trans&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"h"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"-"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"hello"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"hi"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"hi"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"hi&nbsp;all,&nbsp;I&nbsp;said&nbsp;hello"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$trans</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
164</span>
182<div class="phpcode"><code><span style="color: #000000">
183<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"baab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"ab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"01"</span><span style="color: #007700">),</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$trans&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"ab"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"01"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"baab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$trans</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
184</span>
Subs.php https://github.com/Arantor/Elkarte.git | PHP | 4,142 lines
1047
1048						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1049						{
1059							}
1060							$php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]);
1061						}
1084
1085						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1086						{
1096							}
1097							$php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]);
1098						}
2937			// @todo add a hook here
2938			$securityFiles = array('install.php', 'webinstall.php', 'upgrade.php', 'convert.php', 'repair_paths.php', 'repair_settings.php', 'Settings.php~', 'Settings_bak.php~');
2939			foreach ($securityFiles as $i => $securityFile)
Subs-Auth.php https://github.com/smf-portal/SMF2.1.git | PHP | 803 lines
1<?php
2
10 * @copyright 2012 Simple Machines
11 * @license http://www.simplemachines.org/about/smf/license.php BSD
12 *
70			// Fake the $boardurl so we can set a different cookie.
71			$alias = strtr(trim($alias), array('http://' => '', 'https://' => ''));
72			$boardurl = 'http://' . $alias;
90		// We need to meddle with the session.
91		require_once($sourcedir . '/Session.php');
92
120
121	// Parse the URL with PHP to make life easier.
122	$parsed_url = parse_url($boardurl);
148 * - sets $_SESSION['login_url'] to $_SERVER['REQUEST_URL'].
149 * - uses the 'kick_guest' sub template found in Login.template.php.
150 */
Subs-Editor.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,171 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
73	{
74		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
75		$context['message'] = bbc_to_html($_REQUEST['message']);
79		$_REQUEST['message'] = un_htmlspecialchars($_REQUEST['message']);
80		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
81
93	// Turn line breaks back into br's.
94	$text = strtr($text, array("\r" => '', "\n" => '<br />'));
95
97	// !!! Tie in with bbc permissions ?
98	foreach (array('code', 'php', 'nobbc') as $code)
99	{
Subs-Post.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 3,272 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
146		- types supported are 'approval', 'activation', and 'standard'.
147		- called by registerMember() function in Subs-Members.php.
148		- email is sent to all groups that have the moderate_forum permission.
165	// Clean up after nobbc ;).
166	$message = preg_replace_callback('~\[nobbc\](.+?)\[/nobbc\]~i', create_function('$m', ' return "[nobbc]" . strtr("$m[1]", array("[" => "&#91;", "]" => "&#93;", ":" => "&#58;", "@" => "&#64;")) . "[/nobbc]";'), $message);
167
168	// Remove \r's... they're evil!
169	$message = strtr($message, array("\r" => ''));
170
238					if ($htmlfunc === null)
239						$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \'&#13;\', \'  \' => \' &#32;\', \'[\' => \'&#91;\', \']\' => \'&#93;\')) . \'[/html]\';');
240					$parts[$i] = preg_replace_callback('~\[html\](.+?)\[/html\]~is', $htmlfunc, $parts[$i]);
Subs-Auth.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 740 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
39		- sets $_SESSION['login_url'] to $_SERVER['REQUEST_URL'].
40		- uses the 'kick_guest' sub template found in Login.template.php.
41
48		  password.
49		- loads Login.template.php and uses the admin_login sub template.
50		- sends data to template so the admin is sent on to the page they
68	void JSMembers()
69		- called by index.php?action=findmember.
70		- is used as a popup for searching members.
78	void resetPassword(int id_member, string username = null)
79		- called by Profile.php when changing someone's username.
80		- checks the validity of the new username.
Search.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,105 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
25		- decodes and loads search parameters given in the URL (if any).
26		- the form redirects to index.php?action=search2.
27
49	'forum_version' => 'SMF 2.0',
50	// This is the minimum version of SMF that an API could have been written for to work. (strtr to stop accidentally updating version on release)
51	'search_version' => strtr('SMF 2+0=Beta=2', array('+' => '.', '=' => ' ')),
82	{
83		require_once($sourcedir . '/Subs-Editor.php');
84		$verificationOptions = array(
313
314	require_once($sourcedir . '/Display.php');
315	require_once($sourcedir . '/Subs-Package.php');
Load.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,750 lines
1455		$detected_url .= empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST'];
1456		$temp = preg_replace('~/' . basename($scripturl) . '(/.+)?$~', '', strtr(dirname($_SERVER['PHP_SELF']), '\\', '/'));
1457		if ($temp != '/')
2233
2234		<div style="margin: 0 20px;"><tt>', strtr(strtr($error, array('<strong>' . $boarddir => '<strong>...', '<strong>' . strtr($boarddir, '\\', '/') => '<strong>...')), '\\', '/'), '</tt></div>';
2235
2568
2569	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2570	$value = $value === null ? null : serialize($value);
2678
2679	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2680
2706	// Otherwise it's SMF data!
2707	elseif (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
2708	{
texy.php https://github.com/boxyman/woocommerce.git | PHP | 966 lines
1<?php
2
16/**
17 * Check PHP configuration.
18 */
32// Texy! libraries
33require_once dirname(__FILE__) . '/libs/RegExp.Patterns.php';
34require_once dirname(__FILE__) . '/libs/TexyObject.php';
34require_once dirname(__FILE__) . '/libs/TexyObject.php';
35require_once dirname(__FILE__) . '/libs/TexyHtml.php';
36require_once dirname(__FILE__) . '/libs/TexyModifier.php';
36require_once dirname(__FILE__) . '/libs/TexyModifier.php';
37require_once dirname(__FILE__) . '/libs/TexyModule.php';
38require_once dirname(__FILE__) . '/libs/TexyParser.php';
38require_once dirname(__FILE__) . '/libs/TexyParser.php';
39require_once dirname(__FILE__) . '/libs/TexyUtf.php';
40require_once dirname(__FILE__) . '/libs/TexyConfigurator.php';
Subs-Editor.php https://github.com/leftnode/nooges.com.git | PHP | 2,176 lines
1<?php
2/**********************************************************************************
2/**********************************************************************************
3* Subs-Editor.php                                                                 *
4***********************************************************************************
84	{
85		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
86		$context['message'] = bbc_to_html($_REQUEST['message']);
90		$_REQUEST['message'] = un_htmlspecialchars($_REQUEST['message']);
91		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
92
104	// Turn line breaks back into br's.
105	$text = strtr($text, array("\r" => '', "\n" => '<br />'));
106
108	// !!! Tie in with bbc permissions ?
109	foreach (array('code', 'php', 'nobbc') as $code)
110	{
Subs-Post.php https://github.com/leftnode/nooges.com.git | PHP | 3,165 lines
1<?php
2/**********************************************************************************
2/**********************************************************************************
3* Subs-Post.php                                                                   *
4***********************************************************************************
157		- types supported are 'approval', 'activation', and 'standard'.
158		- called by registerMember() function in Subs-Members.php.
159		- email is sent to all groups that have the moderate_forum permission.
176	// Clean up after nobbc ;).
177	$message = preg_replace('~\[nobbc\](.+?)\[/nobbc\]~ie', '\'[nobbc]\' . strtr(\'$1\', array(\'[\' => \'&#91;\', \']\' => \'&#93;\', \':\' => \'&#58;\', \'@\' => \'&#64;\')) . \'[/nobbc]\'', $message);
178
179	// Remove \r's... they're evil!
180	$message = strtr($message, array("\r" => ''));
181
246				if (allowedTo('admin_forum'))
247					$parts[$i] = preg_replace('~\[html\](.+?)\[/html\]~ise', '\'[html]\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/html]\'', $parts[$i]);
248				// We should edit them out, or else if an admin edits the message they will get shown...
Subs-Auth.php https://github.com/leftnode/nooges.com.git | PHP | 837 lines
1<?php
2/**********************************************************************************
2/**********************************************************************************
3* Subs-Auth.php                                                                   *
4***********************************************************************************
50		- sets $_SESSION['login_url'] to $_SERVER['REQUEST_URL'].
51		- uses the 'kick_guest' sub template found in Login.template.php.
52
59		  password.
60		- loads Login.template.php and uses the admin_login sub template.
61		- sends data to template so the admin is sent on to the page they
70	void show_db_error(bool loadavg = false)
71		- called by db_fatal_error() function (in Errors.php.)
72		- shows a complete page independent of language files or themes.
87	void JSMembers()
88		- called by index.php?action=findmember.
89		- is used as a popup for searching members.
Load.php https://github.com/leftnode/nooges.com.git | PHP | 2,657 lines
179	// UTF-8 in regular expressions is unsupported on PHP(win) versions < 4.2.3.
180	$utf8 = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8' && (strpos(strtolower(PHP_OS), 'win') === false || @version_compare(PHP_VERSION, '4.2.3') != -1);
181
2157
2158		<div style="margin: 0 20px;"><tt>', strtr(strtr($error, array('<strong>' . $boarddir => '<strong>...', '<strong>' . strtr($boarddir, '\\', '/') => '<strong>...')), '\\', '/'), '</tt></div>';
2159
2492
2493	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2494	$value = $value === null ? null : serialize($value);
2585
2586	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2587
2613	// Otherwise it's SMF data!
2614	elseif (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
2615	{
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21