100+ results for 'php strrchr'

Not the results you expected?

SkPostConfig.h (https://github.com/Jib-BAOSP/platform_external_skia.git) C Header · 258 lines

167 #ifndef sk_strrchr

168 #define sk_strrchr(s, c) strrchr(s, c)

169 #endif

170 #ifndef sk_strcmp

LiveDocx.php (https://github.com/timglabisch/pimcore.git) PHP · 415 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: LiveDocx.php 25024 2012-07-30 15:08:15Z rob $

21 */

22

78 *

79 * {code}

80 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

81 * array (

82 * 'username' => 'myUsername',

94 *

95 * {code}

96 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

97 * array (

98 * 'username' => 'myUsername',

string.c (https://bitbucket.org/zarboz/htc-one-m7-modified-kernel.git) C · 588 lines

218 #endif

219

220 #ifndef __HAVE_ARCH_STRRCHR

221 char *strrchr(const char *s, int c)

228 return NULL;

229 }

230 EXPORT_SYMBOL(strrchr);

231 #endif

232

vfs_syncops.c (https://github.com/theuni/XBMC-deps.git) C · 228 lines

45 static char *parent_dir(TALLOC_CTX *mem_ctx, const char *name)

46 {

47 const char *p = strrchr(name, '/');

48 if (p == NULL) {

49 return talloc_strdup(mem_ctx, ".");

func_attachments.php (https://github.com/sidisinsane/TrellisDesk.git) PHP · 260 lines

1 <?php

2

3 /**

92 $allowed_exts = array_map( create_function( '$a', 'return \'.\'. trim( $a );' ), explode( ',', $this->trellis->user['g_upload_exts'] ) );

93

94 $file_ext = strrchr( $file['name'], "." );

95

96 if ( ! in_array( $file_ext, $allowed_exts ) )

index.php (https://bitbucket.org/apueee/clientmanager.git) PHP · 166 lines

1 <?php

2

3 /*

4 *---------------------------------------------------------------

5 * PHP ERROR REPORTING LEVEL

6 *---------------------------------------------------------------

7 *

8 * By default CI runs with error reporting set to ALL. For security

9 * reasons you are encouraged to change this to 0 when your site goes live.

10 * For more info visit: http://www.php.net/error_reporting

11 *

12 */

46 * --------------------------------------------------------------------

47 *

48 * Normally you will set your default controller in the routes.php file.

49 * You can, however, force a custom routing by hard-coding a

50 * specific controller class/function here. For most applications, you

BufferedReader.php (https://gitlab.com/Isaki/le331.fr) PHP · 196 lines

1 <?php

2 /*

3 * $Id: 860064af39647023c2644e87267184447ceb93ae $

20 */

21

22 include_once 'phing/system/io/Reader.php';

23

24 /**

73 if (!$this->in->eof()) {

74

75 $notValidPart = strrchr($data, "\n");

76 $notValidPartSize = strlen($notValidPart);

77

xbm.c (https://github.com/gmphp/PHP.git) C · 241 lines

1 /*

2 +----------------------------------------------------------------------+

3 | PHP Version 5 |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 1997-2010 The PHP Group |

6 +----------------------------------------------------------------------+

7 | This source file is subject to version 3.01 of the PHP license, |

8 | that is bundled with this package in the file LICENSE, and is |

9 | available through the world-wide-web at the following url: |

10 | http://www.php.net/license/3_01.txt |

11 | If you did not receive a copy of the PHP license and are unable to |

12 | obtain it through the world-wide-web, please send a note to |

13 | license@php.net so we can mail you a copy immediately. |

14 +----------------------------------------------------------------------+

15 | Author: Marcus Boerger <helly@php.net> |

flx_glob.cpp (git://github.com/felix-lang/felix.git) C++ · 374 lines

14 for(pch = strCharSet; *pch; ++pch)

15 {

16 char const *p = strrchr(string, *pch);

17

18 if(NULL != p)

index.php (https://github.com/pussbb/CI_DEV_CMS.git) PHP · 166 lines

1 <?php

2

3 /*

4 *---------------------------------------------------------------

5 * PHP ERROR REPORTING LEVEL

6 *---------------------------------------------------------------

7 *

8 * By default CI runs with error reporting set to ALL. For security

9 * reasons you are encouraged to change this when your site goes live.

10 * For more info visit: http://www.php.net/error_reporting

11 *

12 */

46 * --------------------------------------------------------------------

47 *

48 * Normally you will set your default controller in the routes.php file.

49 * You can, however, force a custom routing by hard-coding a

50 * specific controller class/function here. For most applications, you

Database.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 307 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

181 if($this->fileExists($directory . $filename)) {

182 $index = 1;

183 $extension = strrchr($filename, '.');

184 $filenameWoExtension = substr($filename, 0, -1 * strlen($extension));

185 while ($this->fileExists($directory . $filenameWoExtension . '_' . $index . $extension)) {

Translator.php (https://github.com/aodeski/symfony.git) PHP · 212 lines

1 <?php

2

3 /*

205

206 if (strlen($locale) > 3) {

207 array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_'))));

208 }

209

Database.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 336 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

207 if ($this->fileExists($directory . $filename)) {

208 $index = 1;

209 $extension = strrchr($filename, '.');

210 $filenameWoExtension = substr($filename, 0, -1 * strlen($extension));

211 while ($this->fileExists($directory . $filenameWoExtension . '_' . $index . $extension)) {

Utils.php (git://github.com/fabpot/PHP-CS-Fixer.git) PHP · 118 lines

1 <?php

2

3 /*

4 * This file is part of PHP CS Fixer.

5 *

6 * (c) Fabien Potencier <fabien@symfony.com>

114 }

115

116 return ltrim(strrchr(str_replace(array("\r\n", "\r"), "\n", $token->getContent()), 10), "\n");

117 }

118 }

admin_acronyms.php (https://github.com/igorw-forks/icy_phoenix.git) PHP · 206 lines

20 // Load default header

21 if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './../');

22 if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));

23 require('pagestart.' . PHP_EXT);

114 {

115 $message = 'Acronym already in Database.';

116 $message .= '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

117

118 $db->sql_freeresult($result);

132 $db->clear_cache('acronyms_', TOPICS_CACHE_FOLDER);

133

134 $message .= '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

135

136 message_die(GENERAL_MESSAGE, $message);

146 $db->clear_cache('acronyms_', TOPICS_CACHE_FOLDER);

147

148 $message = $lang['Acronym_removed'] . '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

149

150 message_die(GENERAL_MESSAGE, $message);

class_compress_js_css.php (https://github.com/igorw-forks/icy_phoenix.git) PHP · 235 lines

1 <?php

2 /**

3 *

5 * @version $Id$

6 * @copyright (c) 2008 Icy Phoenix

7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

8 *

9 */

136 {

137 $file = $source_dir . '/' . $file_to_compress;

138 $filetype = substr(strrchr($file_to_compress, '.'), 1);

139 if ((file_exists($file)) && ($filetype == $type))

140 {

150 if(!is_dir($file) && !is_link($file) && ($file !== '.') && ($file !== '..'))

151 {

152 $filetype = substr(strrchr($file, '.'), 1);

153 if ($filetype == $type)

154 {

admin_acronyms.php (git://github.com/MightyGorgon/icy_phoenix.git) PHP · 182 lines

20 // Load default header

21 if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './../');

22 if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));

23 require('pagestart.' . PHP_EXT);

98 {

99 $message = 'Acronym already in Database.';

100 $message .= '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

101 $db->sql_freeresult($result);

102 message_die(GENERAL_MESSAGE, $message);

112 $db->clear_cache('acronyms_', TOPICS_CACHE_FOLDER);

113

114 $message .= '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

115

116 message_die(GENERAL_MESSAGE, $message);

124 $db->clear_cache('acronyms_', TOPICS_CACHE_FOLDER);

125

126 $message = $lang['Acronym_removed'] . '<br /><br />' . sprintf($lang['Click_return_acronymadmin'], '<a href="' . append_sid('admin_acronyms.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');

127

128 message_die(GENERAL_MESSAGE, $message);

extprofile_mb.h (https://github.com/kevlund/hiphop-php.git) C Header · 323 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

DatagridMapper.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 128 lines

1 <?php

2

3 /*

72

73 if (!isset($filterOptions['field_name'])) {

74 $filterOptions['field_name'] = substr(strrchr('.'.$name, '.'), 1);

75 }

76

stats.php (https://github.com/phpbb/mpv.git) PHP · 155 lines

1 <?php

2 /**

3 * Stats file

5 * @package mpv_server

6 * @version $Id$

7 * @copyright (c) 2010 phpBB Group

8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License

12 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");

13

14 $phpEx = substr(strrchr(__FILE__, '.'), 1);

15 $root_path = './';

16

17 // Will define all needed things.

18 include($root_path . 'mpv_config.' . $phpEx);

19 include($root_path . 'includes/languages/' . MPV_LANG . '/lang.' . $phpEx);

va-arg-18-0.asm (https://github.com/kframework/X86-64-semantics.git) Assembly · 528 lines

186 popq %rbp

187 ret

188 .globl strrchr

189 strrchr:

fsutils.c (https://github.com/mend0za/pkgsrc-2011Q3.git) C · 217 lines

40 char *p;

41

42 if ((p = strrchr(path, ':')) == NULL) {

43 return (false);

44 }

63 }

64

65 part = strrchr(devlink, 'p');

66 slice = strrchr(devlink, 's');

67 disk = strrchr(devlink, 'd');

68

69 if ((part != NULL) && (part > slice) && (part > disk)) {

magmi_csvdatasource.php (https://gitlab.com/myurd/magmi-git) PHP · 136 lines

1 <?php

2 require_once("magmi_csvreader.php");

3 require_once("fshelper.php");

4

5 class Magmi_CSVDataSource extends Magmi_Datasource

82

83 $outname = $csvdldir . "/" . basename($url);

84 $ext = substr(strrchr($outname, '.'), 1);

85 if ($ext != "txt" && $ext != "csv") {

86 $outname = $outname . ".csv";

ext_mbstring.h (https://gitlab.com/Blueprint-Marketing/hhvm) C Header · 223 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

generate-standalone.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 159 lines

90

91 /**

92 * Copies a file to another location recursively, if it is a PHP file

93 * remove includes

94 * @param string $file Original file

98 {

99 $contents = file_get_contents($file);

100 if (strrchr($file, '.') === '.php') $contents = replace_includes($contents);

101 return file_put_contents($sfile, $contents);

102 }

122

123 echo 'Generating includes file... ';

124 shell_exec('php generate-includes.php');

125 echo "done!\n";

126

InterchangeBuilder.php (https://github.com/markn86/moodle.git) PHP · 226 lines

1 <?php

2

3 class HTMLPurifier_ConfigSchema_InterchangeBuilder

47 $dh = opendir($dir);

48 while (false !== ($file = readdir($dh))) {

49 if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') {

50 continue;

51 }

175

176 /**

177 * Evaluates an array PHP code string without array() wrapper

178 * @param string $contents

179 */

String.php (git://github.com/thorsten/phpMyFAQ.git) PHP · 382 lines

1 <?php

2 /**

3 * The main string wrapper class.

4 *

5 * PHP Version 5.3.0

6 *

7 * This Source Code Form is subject to the terms of the Mozilla Public License,

9 * obtain one at http://mozilla.org/MPL/2.0/.

10 *

11 * @category phpMyFAQ

12 * @package String

13 * @author Anatoliy Belsky <ab@php.net>

14 * @copyright 2009-2012 phpMyFAQ Team

15 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0

16 * @link http://www.phpmyfaq.de

index.php (https://bitbucket.org/amitholkar/zenfile-18-05.git) PHP · 204 lines

1 <?php

2 /*

3 *---------------------------------------------------------------

78 * --------------------------------------------------------------------

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

82 * specific controller class/function here. For most applications, you

111 * The $assign_to_config array below will be passed dynamically to the

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

115 * multiple front controller files, with each file containing different

161 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

162

163 // The PHP file extension

164 // this global constant is deprecated.

165 define('EXT', '.php');

misc.c (https://bitbucket.org/Don2x/mod-kernel-m7-sources.git) C · 124 lines

56 {

57 if (*path == '/')

58 return strrchr(path, '/') + 1;

59 else

60 return path;

BufferedReader.php (https://github.com/richhl/kalturaCE.git) PHP · 170 lines

1 <?php

2 /*

3 * $Id: BufferedReader.php 3076 2006-12-18 08:52:12Z fabien $

20 */

21

22 include_once 'phing/system/io/Reader.php';

23

24 /*

69 if (!$this->in->eof()) {

70

71 $notValidPart = strrchr($data, "\n");

72 $notValidPartSize = strlen($notValidPart);

73

regexp.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 253 lines

1 <?php

2 /**

3 * File containing the ezcMvcRegexpRoute class

142 $patternDelim = $pattern[0];

143 // Obtain pattern modifiers

144 $patternModifier = substr( strrchr( $pattern, $patternDelim ), 1 );

145 // Find prefix delimiter

146 $prefixDelim = $prefix[0];

147 // Obtain prefix modifiers

148 $prefixModifier = substr( strrchr( $prefix, $prefixDelim ), 1 );

149 // If modifiers are not the same, throw exception

150 if ( $patternModifier !== $prefixModifier )

generate_utf_casefold.php (https://github.com/naderman/phpbb-orchestra.git) PHP · 156 lines

1 <?php

2 /**

3 *

6 * @copyright (c) 2005 phpBB Group

7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

8 *

9 */

10

11 if (php_sapi_name() != 'cli')

12 {

13 die("This program must be run from the command line.\n");

28 $phpbb_root_path = '../';

29 $phpEx = substr(strrchr(__FILE__, '.'), 1);

30

31 echo "Checking for required files\n";

74 echo "Writing to case_fold_$idx.$phpEx\n";

75 $fp = fopen($phpbb_root_path . 'includes/utf/data/case_fold_' . strtolower($idx) . '.' . $phpEx, 'wb');

76 fwrite($fp, '<?php return ' . my_var_export($contents) . ';');

merge.php (https://gitlab.com/dkiller1/rapidleech) PHP · 176 lines

15 $usingcrcfile = (substr ( $file ["name"], - 4 ) === '.001') ? false : true;

16 ?>

17 <form method="post" action="<?php echo $PHP_SELF; ?>"><input type="hidden" name="files[0]" value="<?php echo $_GET ["files"] [0]; ?>" />

18 <table>

19 <?php

28 <?php } ?>

29 <input type="radio" name="crc_mode" value="fake"<?php if (!function_exists('hash_file')) { echo 'checked="checked"'; }?> />&nbsp;<?php echo lang(174); ?></span></td>

30 </tr>

31 <tr>

32 <td><input type="checkbox" name="del_ok" <?php echo $options['disable_deleting'] ? 'disabled="disabled"' : 'checked="checked"'; ?> />&nbsp;<?php echo lang(175); ?></td>

33 </tr>

34 <?php

36 ?>

37 <tr>

38 <td align="center"><?php echo lang(176); ?>: <b><?php echo lang(177); ?></b></td>

39 </tr>

40 <?php

TestLibraryFile.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 107 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: TestLibraryFile.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

63 {

64 $this->_forClassName = $this->_resource->getAttribute('forClassName');

65 $this->_filesystemName = ucfirst(ltrim(strrchr($this->_forClassName, '_'), '_')) . 'Test.php';

66 parent::init();

67 return $this;

82 $codeGenFile = new Zend_CodeGenerator_Php_File(array(

83 'requiredFiles' => array(

84 'PHPUnit/Framework/TestCase.php'

85 ),

86 'classes' => array(

bookmark_edit.php (https://github.com/BenBE/ispCP.git) PHP · 105 lines

1 <?php

2

3 define('SM_PATH','../../');

4

5 include_once('bookmarks_data.php');

6 include_once('functions.php');

7 if (file_exists(SM_PATH . 'include/validate.php'))

8 include_once(SM_PATH . 'include/validate.php');

9 else if (file_exists(SM_PATH . 'src/validate.php'))

10 include_once(SM_PATH . 'src/validate.php');

11 include_once(SM_PATH . 'functions/page_header.php');

12

13 sqgetGlobalVar('passval', $passval, SQ_GET);

imperium.php (https://github.com/vem882/SuperNova.git) PHP · 185 lines

1 <?php

2

3 /**

4 * imperium.php

5 *

6 * Overview you empire

12

13 $ugamela_root_path = (defined('SN_ROOT_PATH')) ? SN_ROOT_PATH : './';

14 $phpEx = substr(strrchr(__FILE__, '.'), 1);

15 include("{$ugamela_root_path}common.{$phpEx}");

17 if ($IsUserChecked == false) {

18 includeLang('login');

19 header('Location: login.php');

20 }

21

leaky.cpp (git://github.com/zpao/v8monkey.git) C++ · 784 lines ✨ Summary

This C++ code is part of a memory leak detection tool for a compiler. It tracks memory allocations and deallocations, identifying which symbols (e.g., functions, variables) are responsible for memory leaks. The code generates a graphical representation of the symbol tree, showing which symbols have leaked memory and how much.

129 {

130 applicationName = argv[0];

131 applicationName = strrchr(applicationName, '/');

132 if (!applicationName) {

133 applicationName = argv[0];

Processor.php (https://github.com/rocknoon/Stack.git) PHP · 169 lines

1 <?php

2 /*---------------------------------------------------------------

3 功能: 图片操作类

110 //*/

111 if (file_exists($newName)) unlink($newName);

112 $maketype = strtolower(substr(strrchr($newName,"."),1));

113 switch($maketype)

114 {

search.php (https://github.com/myrtus/SuperNova.git) PHP · 126 lines

1 <?php

2 /**

3 * search.php

11 */

12

13 include('common.' . substr(strrchr(__FILE__, '.'), 1));

14

15 $searchtext = mysql_real_escape_string($_POST['searchtext']);

93 $s=$r;

94 //para obtener el nombre del planeta

95 $s['ally_name'] = ($s['ally_name']!='')?"<a href=\"alliance.php?mode=ainfo&tag={$s['ally_tag']}\">{$s['ally_name']}</a>":'';

96 $s['position'] = "<a href=\"stat.php?start=".$s['total_rank']."\">".$s['total_rank']."</a>";

104 $s=$r;

105 $s['ally_points'] = pretty_number($s['total_points']);

106 $s['ally_tag'] = "<a href=\"alliance.php?mode=ainfo&tag={$s['ally_tag']}\">{$s['ally_tag']}</a>";

107 $result_list .= parsetemplate($row, $s);

108 }

main.c (https://github.com/n8han/shouty.git) C · 117 lines

37 # ifndef HAVE_STRCHR

38 # define strchr index

39 # define strrchr rindex

40 # endif

41 char *strchr(), *strrchr();

get-image.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 152 lines

1 <?php

2 /*

3 -------------------------------------------------------------------------

4 Credits: Bit Repository

5 URL: http://www.bitrepository.com/web-programming/php/download-image.html

6 -------------------------------------------------------------------------

7 */

22

23 // What sort of image?

24 $type = substr(strrchr($mime, '/'), 1);

25

26 switch ($type)

76 if(isSet($this->set_extension))

77 {

78 $ext = strrchr($this->source, ".");

79 $strlen = strlen($ext);

80 $new_name = basename(substr($this->source, 0, -$strlen)).'.'.$new_image_ext;

armksyms.c (https://github.com/v-b-n/XCeLL-V69-2.git) C · 169 lines

85 /* string / mem functions */

86 EXPORT_SYMBOL(strchr);

87 EXPORT_SYMBOL(strrchr);

88 EXPORT_SYMBOL(memset);

89 EXPORT_SYMBOL(memcpy);

string.h (http://opensource.apple.com/release/mac-os-x-1074/) C++ Header · 98 lines

86 <span class="enscript-type">extern</span> <span class="enscript-type">char</span> * strpbrk _ANSI_ARGS_((CONST <span class="enscript-type">char</span> *string,

87 CONST <span class="enscript-type">char</span> *chars));

88 <span class="enscript-type">extern</span> <span class="enscript-type">char</span> * strrchr _ANSI_ARGS_((CONST <span class="enscript-type">char</span> *string, <span class="enscript-type">int</span> c));

89 <span class="enscript-type">extern</span> size_t strspn _ANSI_ARGS_((CONST <span class="enscript-type">char</span> *string,

90 CONST <span class="enscript-type">char</span> *chars));

upload.php (https://github.com/jpvf/boilerplate.git) PHP · 134 lines

1 <?php

2

3 class upload{

25 {

26 $this->allowed_ext = explode('|', $this->allowed);

27 $this->file_ext = strrchr($this->file['name'],'.');

28 list($dot, $this->file_ext) = explode('.', $this->file_ext);

29

54

55 if(isset($this->timestamp) && !empty($this->timestamp) && $this->timestamp === TRUE){

56 $ext = strrchr($this->file['name'],'.');

57 $name = reverse_strrchr($this->file['name'],'.');

Adapter.php (https://github.com/besters/My-Base.git) PHP · 131 lines

1 <?php

2 abstract class Unodor_Translate_Adapter extends Zend_Translate_Adapter {

3

68 } else if (strlen($locale) != 2) {

69 // faster than creating a new locale and separate the leading part

70 $locale = substr($locale, 0, -strlen(strrchr($locale, '_')));

71

72 if ((is_string($messageId) || is_int($messageId)) && isset($this->_translate[$locale][$messageId])) {

restorelib.php (https://github.com/manoj240375/moodle_edify.git) PHP · 221 lines

1 <?php

2 //This php script contains all the stuff to backup/restore

42 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

43 if ($mod) {

44 $log->url = "view.php?id=".$log->cmid;

45 $log->info = $mod->new_id;

46 $status = true;

53 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

54 if ($mod) {

55 $log->url = "view.php?id=".$log->cmid;

56 $log->info = $mod->new_id;

57 $status = true;

64 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

65 if ($mod) {

66 $log->url = "view.php?id=".$log->cmid;

67 $log->info = $mod->new_id;

68 $status = true;

uri.php (https://github.com/leonardteo/INSE6530.git) PHP · 295 lines

1 <?php

2 /**

3 * Fuel is a fast, lightweight, community driven PHP5 framework.

8 * @license MIT License

9 * @copyright 2010 - 2011 Fuel Development Team

10 * @link http://fuelphp.com

11 */

12

19 * @category Core

20 * @author Dan Horrigan

21 * @link http://fuelphp.com/docs/classes/uri.html

22 */

23 class Uri {

61 if (isset($_SERVER['REQUEST_URI']))

62 {

63 // Some servers require 'index.php?' as the index page

64 // if we are using mod_rewrite or the server does not require

65 // the question mark, then parse the url.

function.mb-strpos.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 130 lines

8 <body><div class="manualnavbar" style="text-align: center;">

9 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-strlen.html">mb_strlen</a></div>

10 <div class="next" style="text-align: right; float: right;"><a href="function.mb-strrchr.html">mb_strrchr</a></div>

11 <div class="up"><a href="ref.mbstring.html">マルチバイト文字列 関数</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

14 <div class="refnamediv">

15 <h1 class="refname">mb_strpos</h1>

16 <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">mb_strpos</span> &mdash; <span class="dc-title">文字列の中に指定した文字列が最初に現れる位置を見つける</span></p>

17

18 </div>

125 </div><hr /><div class="manualnavbar" style="text-align: center;">

126 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-strlen.html">mb_strlen</a></div>

127 <div class="next" style="text-align: right; float: right;"><a href="function.mb-strrchr.html">mb_strrchr</a></div>

128 <div class="up"><a href="ref.mbstring.html">マルチバイト文字列 関数</a></div>

129 <div class="home"><a href="index.html">PHP Manual</a></div>

faq.php (git://github.com/MightyGorgon/icy_phoenix.git) PHP · 132 lines

1 <?php

2 /**

3 *

5 * @version $Id$

6 * @copyright (c) 2008 Icy Phoenix

7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

8 *

9 */

11 /**

12 *

13 * @Icy Phoenix is based on phpBB

14 * @copyright (c) 2008 phpBB Group

18 define('IN_ICYPHOENIX', true);

19 if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');

20 if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));

21 include(IP_ROOT_PATH . 'common.' . PHP_EXT);

index.php (https://github.com/creative-area/CodeIgniter.git) PHP · 210 lines

1 <?php

2

3 /*

20 */

21

22 $env_path = dirname(__FILE__).'/../application/config/env.php';

23 if ( file_exists($env_path)) {

24 require_once($env_path);

85 * --------------------------------------------------------------------

86 *

87 * Normally you will set your default controller in the routes.php file.

88 * You can, however, force a custom routing by hard-coding a

89 * specific controller class/function here. For most applications, you

118 * The $assign_to_config array below will be passed dynamically to the

119 * config class when initialized. This allows you to set custom config

120 * items or override any default config values found in the config.php file.

121 * This can be handy as it permits you to share one application between

122 * multiple front controller files, with each file containing different

PluralizationRules.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 219 lines

1 <?php

2

3 /*

38

39 if (strlen($locale) > 3) {

40 $locale = substr($locale, 0, -strlen(strrchr($locale, '_')));

41 }

42

191 * Overrides the default plural rule for a given locale.

192 *

193 * @param string $rule A PHP callable

194 * @param string $locale The locale

195 *

206

207 if (strlen($locale) > 3) {

208 $locale = substr($locale, 0, -strlen(strrchr($locale, '_')));

209 }

210

x_blorb.c (https://gitlab.com/ake.forslund/frotz) C · 162 lines

85 mystring = malloc(MAX(len1, len2) * sizeof(char) + 1);

86 memcpy(mystring, filename, MAX(len1, len2) * sizeof(char));

87 p = strrchr(mystring, '.');

88 if (p != NULL) *p = '\0';

89 strncat(mystring, EXT_BLORB, len1);

92 /* Check if foo.blb is there. */

93 if ((fp = fopen(mystring, "rb")) == NULL) {

94 p = strrchr(mystring, '.');

95 if (p != NULL) *p = '\0';

96 strncat(mystring, EXT_BLORB3, len2);

bannerList.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 125 lines

1 <?php

2 /*-----------------------------------

3 | LIST OF BANNER SHOWS ON TOP

30 unlink(B_IMG.$_GET['bname']);

31 // Update xml file

32 require_once 'fw.php';

33 }

34

85 {

86 // Get file extention

87 $extention = strtolower(strrchr($file,'.'));

88 if (in_array($extention, $type))

89 {

Abstract.php (https://github.com/grandison/budo16.git) PHP · 172 lines

1 <?php

2 /**

3 * SocialEngine

7 * @copyright Copyright 2006-2010 Webligo Developments

8 * @license http://www.socialengine.net/license/

9 * @version $Id: Abstract.php 7244 2010-09-01 01:49:53Z john $

10 * @author John Boehr <j@webligo.com>

11 */

49 public function getEntityType()

50 {

51 return strtolower(ltrim(strrchr(get_class($this), '_'), '_'));

52 }

53

connectA.php (https://gitlab.com/cesardemora/neaticketwebapphomeEs) PHP · 207 lines

1 <?php

2

3 require_once ('config.php');

4 // require_once ('config2.php');

5 // require_once ('lineaVacia.php');

6 // require_once ('funcTicket.php');

7 date_default_timezone_set("Europe/Madrid");

8

51 if (substr_count($email,".")>= 1)

52 {//obtengo la terminacion del dominio

53 $term_dom = substr(strrchr ($email, '.'),1);

54 //compruebo que la terminacion del dominio sea correcta

55 if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,"@")) )

maintain_backups.php (https://github.com/rhempen/cms.git) PHP · 135 lines

101 <th width="30%"><?php echo $GLOBALS['BACKUP']['DATEI'];?></th>

102 <th width="30%"><?php echo $GLOBALS['BACKUP']['ERSTELLT'];?></th>

103 <th width="20%"><?php echo $GLOBALS['BACKUP']['DATEIGROESSE'];?></th>

113 $srcfile = 'backups/'.$file['datei'];

114 // $ext = txt oder sql

115 $ext = strrchr($file['datei'], '.');

116 $icon_dwl = '<img src="../gifs/download.png" alt="'.$GLOBALS['TEXTE']['DOWNLOAD'].'" title="'.$GLOBALS['TEXTE']['DOWNLOAD'].'" />';

117 $icon_lup = '<img src="../gifs/view_16.png" alt="'.$GLOBALS['TEXTE']['TEXT_SHOW'].'" title="'.$GLOBALS['TEXTE']['TEXT_SHOW'].'" />';

121 <tr class="<?php echo $class;?>">

122 <td><?php echo $file['datei']; ?></td>

123 <td align="right"><?php echo set_date_time($file['fmt']); ?></td>

125 <td align="center"><?php echo '<a href="'.$srcfile.'">'.$icon.'</a>'; ?></td>

126 <td align="center"><?php echo '<a href="'.$_SERVER['PHP_SELF'].'?act=delete&file='.$file['datei'].'"><img src="../gifs/delete.gif" alt="delete" title="delete" onclick="'.$jscript.'"' ?></td>

127 </tr>

128 <?php

paneladmina.php (https://github.com/myrtus/SuperNova.git) PHP · 169 lines

1 <?php

2

3 /**

4 * paneladmina.php

5 *

6 * @version 1.0s - Security checked for SQL-injection by Gorlum for http://supernova.ws

13 define('IN_ADMIN', true);

14

15 require('../common.' . substr(strrchr(__FILE__, '.'), 1));

16

17 if($user['authlevel'] < 3)

QuestionAddAction.php (http://libstats.googlecode.com/svn/trunk/) PHP · 85 lines

1 <?php

2 require_once 'Action.php';

64 // be able to double-enter by mistake.... I think.

65 $url = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";

66 $url = substr($url, 0, -strrchr($url, '/')). $target;

67 header("Location: $url");

68 exit;

Mbstring.php (git://github.com/thorsten/phpMyFAQ.git) PHP · 293 lines

1 <?php

2 /**

3 * The string wrapper class using mbstring extension.

4 *

5 * PHP Version 5.3

6 *

7 * This Source Code Form is subject to the terms of the Mozilla Public License,

9 * obtain one at http://mozilla.org/MPL/2.0/.

10 *

11 * @category phpMyFAQ

12 * @package String

13 * @author Anatoliy Belsky <ab@php.net>

14 * @copyright 2009-2012 phpMyFAQ Team

15 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0

16 * @link http://www.phpmyfaq.de

index.php (https://bitbucket.org/jose_everson2013/wally-consultoria.git) PHP · 207 lines

1 <?php

2 ini_set("allow_url_fopen", true);

3 ini_set("allow_url_include", true);

82 * --------------------------------------------------------------------

83 *

84 * Normally you will set your default controller in the routes.php file.

85 * You can, however, force a custom routing by hard-coding a

86 * specific controller class/function here. For most applications, you

115 * The $assign_to_config array below will be passed dynamically to the

116 * config class when initialized. This allows you to set custom config

117 * items or override any default config values found in the config.php file.

118 * This can be handy as it permits you to share one application between

119 * multiple front controller files, with each file containing different

165 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

166

167 // The PHP file extension

168 // this global constant is deprecated.

169 define('EXT', '.php');

bootstrap.php (https://github.com/livinglab/openlab.git) PHP · 145 lines

1 <?php

2

3 /*

80 if (!function_exists('mb_strrchr')) {

81 function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }

82 }

83 if (!function_exists('mb_strrichr')) {

112 }

113

114 if (PHP_VERSION_ID >= 80000) {

115 require_once __DIR__.'/Resources/mb_convert_variables.php8';

Adapter.php (https://github.com/bhaumik25/zend-framework.git) PHP · 306 lines

1 <?php

2 /**

3 * Zend Framework

16 * @package Zend_Translate

17 * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

18 * @version $Id: Date.php 2498 2006-12-23 22:13:38Z thomas $

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 */

22

23 /** Zend_Locale */

24 require_once 'Zend/Locale.php';

25

26 /** Zend_Translate_Exception */

27 require_once 'Zend/Translate/Exception.php';

28

29 /**

hostandport.h (https://github.com/tadmarshall/mongo.git) C Header · 188 lines

168 inline void HostAndPort::init(const char *p) {

169 massert(13110, "HostAndPort: host is empty", *p);

170 const char *colon = strrchr(p, ':');

171 if( colon ) {

172 int port = atoi(colon+1);

bootstrap.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 244 lines

1 <?php

2 if (!defined('ABSPATH')) exit;

3 use MailPoetVendor\Symfony\Polyfill\Mbstring as p;

134 }

135 }

136 if (!\function_exists('mb_strrchr')) {

137 function mb_strrchr($s, $needle, $part = \false, $enc = null)

138 {

139 return p\Mbstring::mb_strrchr($s, $needle, $part, $enc);

140 }

141 }

bootstrap.php (https://gitlab.com/aegir/provision) PHP · 62 lines

1 <?php

2

3 /*

39 function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }

40 function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }

41 function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }

42 function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }

43 function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }

index.php (https://gitlab.com/zanderwong/admin) PHP · 195 lines

1 <?php

2

3 /*

78 * --------------------------------------------------------------------

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

82 * specific controller class/function here. For most applications, you

111 * The $assign_to_config array below will be passed dynamically to the

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

115 * multiple front controller files, with each file containing different

157 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

158

159 // The PHP file extension

160 // this global constant is deprecated.

161 define('EXT', '.php');

ext_mbstring.h (https://gitlab.com/0072016/0072016-PHP.LLC) C Header · 223 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010-2015 Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

index.php (https://github.com/yllumi/LetsIgnite.git) PHP · 222 lines

1 <?php

2

3 /*

92 * --------------------------------------------------------------------

93 *

94 * Normally you will set your default controller in the routes.php file.

95 * You can, however, force a custom routing by hard-coding a

96 * specific controller class/function here. For most applications, you

125 * The $assign_to_config array below will be passed dynamically to the

126 * config class when initialized. This allows you to set custom config

127 * items or override any default config values found in the config.php file.

128 * This can be handy as it permits you to share one application between

129 * multiple front controller files, with each file containing different

175 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

176

177 // The PHP file extension

178 // this global constant is deprecated.

179 define('EXT', '.php');

realpath.c (https://bitbucket.org/kmv/aeriebsd-src.git) C · 193 lines

116 if (resolved_len > 1) {

117 resolved[resolved_len - 1] = '\0';

118 q = strrchr(resolved, '/') + 1;

119 *q = '\0';

120 resolved_len = q - resolved;

155 /* Strip the last path component. */

156 resolved[resolved_len - 1] = '\0';

157 q = strrchr(resolved, '/') + 1;

158 *q = '\0';

159 resolved_len = q - resolved;

path.php (https://github.com/shamblett/janitor.git) PHP · 269 lines

1 <?php

2 // Path Class

3 // Scriptol - (c) 2001-2008 Denis Sureau

157 static function getExtension($path)

158 {

159 $ext=strrchr($path,".");

160 if($ext!=false)

161 {

restorelib.php (https://github.com/manoj240375/moodle_edify.git) PHP · 212 lines

1 <?php

2

3 //This function returns a log record with all the necessary transformations

14 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

15 if ($mod) {

16 $log->url = "view.php?id=".$log->cmid;

17 $log->info = $mod->new_id;

18 $status = true;

25 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

26 if ($mod) {

27 $log->url = "view.php?id=".$log->cmid;

28 $log->info = $mod->new_id;

29 $status = true;

36 $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);

37 if ($mod) {

38 $log->url = "view.php?id=".$log->cmid;

39 $log->info = $mod->new_id;

40 $status = true;

FileManager.php (https://github.com/livinglab/openlab.git) PHP · 242 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

147 */

148 public function json_encode_files( $files ) {

149 if ( version_compare( phpversion(), "5.4.0", ">=" ) ) {

150 $files = json_encode( $files, JSON_UNESCAPED_UNICODE );

151 } else {

163

164 /**

165 * Fallback for PHP < 5.4 where JSON_UNESCAPED_UNICODE does not exist.

166 *

167 * @param array $matches

224 */

225 public function get_file_type( $file_name ) {

226 return strtolower( substr( strrchr( $file_name, "." ), 1 ) );

227 }

228

xps_doc.c (https://github.com/mescher/mupdf.git) C · 341 lines

185 /* Save directory name part */

186 fz_strlcpy(buf, part->name, sizeof buf);

187 s = strrchr(buf, '/');

188 if (s)

189 s[0] = 0;

util.c (https://github.com/nesaro/uzbl.git) C · 180 lines

133 char *path_list_dup = g_strdup(path_list);

134

135 char *basename = strrchr(path_list_dup, ':');

136 if(!basename)

137 return file_exists(path_list_dup) ? path_list_dup : NULL;

LiveDocx.php (https://github.com/meritt/zf.git) PHP · 415 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: LiveDocx.php 23953 2011-05-03 05:47:39Z ralph $

21 */

22

78 *

79 * {code}

80 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

81 * array (

82 * 'username' => 'myUsername',

94 *

95 * {code}

96 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

97 * array (

98 * 'username' => 'myUsername',

Ajax.php (https://github.com/intraweb-modules13/IWusers.git) PHP · 242 lines

1 <?php

2

3 class IWusers_Controller_Ajax extends Zikula_Controller_AbstractAjax {

197 $error = $this->__('Changing the avatar has failed.');

198 } else {

199 $file_extension = strtolower(substr(strrchr($chid, "."), 1));

200 $formats = '$jpg$$png$$gif$';

201 $formats = str_replace('$' . $file_extension . '$', '', $formats);

Uploader.class.php (https://gitlab.com/savagekingn/lxui) PHP · 208 lines

1 <?php

2 /**

3 * Created by JetBrains PhpStorm.

185 private function getFileExt()

186 {

187 return strtolower( strrchr( $this->file[ "name" ] , '.' ) );

188 }

189

195 {

196 $pathStr = $this->config[ "savePath" ];

197 if ( strrchr( $pathStr , "/" ) != "/" ) {

198 $pathStr .= "/";

199 }

doschk.c (https://github.com/avsm/src.git) C · 360 lines

69 char *first = path;

70 char *null = path+strlen (path);

71 char *last_slash = strrchr (path, '/');

72 char *cp, *dp;

73 int dots_seen, chars_seen;

76 {

77 * --null = '\0';

78 last_slash = strrchr (path, '/');

79 }

80

Ivy_File.php (https://github.com/JamesRandell/Ivy.git) PHP · 313 lines

1 <?php

2 /**

3 * File module for IVY3.0

244 $result['FILESIZE'] = $array['size'];

245 $result['FILETYPE'] = $array['type'];

246 $result['FILEEXT'] = substr(strrchr($array['name'], '.'), 1);

247 $result['FILETEMPNAME'] = $array['tmp_name'];

248

messagelist.php (https://github.com/myrtus/SuperNova.git) PHP · 127 lines

1 <?php

2

3 /**

4 * messagelist.php

5 *

6 * @version 1

12 define('IN_ADMIN', true);

13

14 require('../common.' . substr(strrchr(__FILE__, '.'), 1));

15

16 if($user['authlevel'] < 3)

121 if (isset($_POST['delit'])) {

122 doquery ("DELETE FROM {{messages}} WHERE `message_id` = '". $_POST['delit'] ."';");

123 AdminMessage ( $lang['mlst_mess_del'] ." ( ". $_POST['delit'] ." )", $lang['mlst_title'], "./messagelist.".PHP_EX, 3);

124 }

125 display ($display, $lang['mlst_title'], false, '', true);

Translator.php (https://gitlab.com/jalon/doadoronline) PHP · 292 lines

1 <?php

2

3 /*

284 }

285

286 if (strrchr($locale, '_') !== false) {

287 array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_'))));

upload.php (https://github.com/sydlawrence/SocialFeed.git) PHP · 162 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /**

3 * Upload helper class for working with the global $_FILES

4 * array and Validation library.

5 *

6 * $Id: upload.php 3769 2008-12-15 00:48:56Z zombor $

7 *

8 * @package Core

9 * @author Kohana Team

10 * @copyright (c) 2007-2008 Kohana Team

11 * @license http://kohanaphp.com/license.html

12 */

13 class upload_Core {

117

118 // Get the default extension of the file

119 $extension = strtolower(substr(strrchr($file['name'], '.'), 1));

120

121 // Get the mime types for the extension

index.php (https://github.com/chamnan/ionize.git) PHP · 220 lines

1 <?php

2

3 /*

94 * --------------------------------------------------------------------

95 *

96 * Normally you will set your default controller in the routes.php file.

97 * You can, however, force a custom routing by hard-coding a

98 * specific controller class/function here. For most applications, you

113 // $routing['directory'] = '';

114

115 // The controller class file name. Example: Mycontroller.php

116 // $routing['controller'] = '';

117

127 * The $assign_to_config array below will be passed dynamically to the

128 * config class when initialized. This allows you to set custom config

129 * items or override any default config values found in the config.php file.

130 * This can be handy as it permits you to share one application between

131 * multiple front controller files, with each file containing different

browser.php (https://github.com/stevenba/pfsense.git) PHP · 137 lines

1 <?php

2 /*

3 pfSense_MODULE: shell

47 <tr>

48 <td id="fbCurrentDir" colspan="3" class="vexpl" align="left">

49 <?php

50

51 // ----- read contents -----

56 </td>

57 </tr>

58 <?php

59 }

60 else {

100 elseif($ext == ".inc" ) $type = "php";

101 elseif($ext == ".php" ) $type = "php";

102 elseif($ext == ".conf") $type = "system";

103 elseif($ext == ".pid" ) $type = "system";

editline.h (https://github.com/diogogmt/mozilla-central.git) C Header · 135 lines

126 extern char *strcat();

127 extern char *strchr();

128 extern char *strrchr();

129 extern char *strcpy();

130 extern char *strdup();

function.strrev.html (https://bitbucket.org/thncr/manuals.git) HTML · 86 lines

7 </head>

8 <body><div class="manualnavbar" style="text-align: center;">

9 <div class="prev" style="text-align: left; float: left;"><a href="function.strrchr.html">strrchr</a></div>

10 <div class="next" style="text-align: right; float: right;"><a href="function.strripos.html">strripos</a></div>

11 <div class="up"><a href="ref.strings.html">字符串函数</a></div>

14 <div class="refnamediv">

15 <h1 class="refname">strrev</h1>

16 <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">strrev</span> &mdash; <span class="dc-title">反转字符串</span></p>

17

18 </div>

80

81 </div><hr /><div class="manualnavbar" style="text-align: center;">

82 <div class="prev" style="text-align: left; float: left;"><a href="function.strrchr.html">strrchr</a></div>

83 <div class="next" style="text-align: right; float: right;"><a href="function.strripos.html">strripos</a></div>

84 <div class="up"><a href="ref.strings.html">字符串函数</a></div>

tst-pcre.c (https://github.com/CyanogenMod/android_ndk.git) C · 249 lines

100 {

101 /* Pattern. */

102 p = strrchr (line + 1, '/');

103

104 pattern_valid = 0;

Factory.php (https://bitbucket.org/gencer/zf2.git) PHP · 299 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

48 */

49 protected static $writerExtensions = array(

50 'php' => 'php',

51 'ini' => 'ini',

52 'json' => 'json',

98 $extension = strtolower($pathinfo['extension']);

99

100 if ($extension === 'php') {

101 if (!is_file($filepath) || !is_readable($filepath)) {

102 throw new Exception\RuntimeException(sprintf(

165 }

166

167 $extension = substr(strrchr($filename, '.'), 1);

168 $directory = dirname($filename);

169

filespec.c (https://github.com/soywiz/pspemu.git) C · 424 lines

147 if (strcmp(p, "..") == 0) /* move up cwd */

148 /* remove last directory from cwd */

149 *((char *)strrchr(cwd, DIRCHAR)) = '\0';

150 else if (strcmp(p, ".") != 0) /* not current directory */

151 {

167 {

168 /* remove last directory from cwd */

169 *((char *)strrchr(cwd, DIRCHAR)) = '\0';

170 }

171 else if (strcmp(p,".") != 0) /* no more subdirectories ... */

xml_saxy_lite_parser.php (https://github.com/MaBelleEcole/Main.git) PHP · 243 lines

1 <?php

2 /**

3 * SAXY Lite is a non-validating, but lightweight and fast SAX parser for PHP, modelled on the Expat parser

24 define('SAXY_STATE_PARSING', 1);

25

26 require_once(SAXY_INCLUDE_PATH . 'xml_saxy_shared.php');

27

28 /**

213 else {

214 if (strpos($tagText, '/') !== false) {

215 $tagText = trim(substr($tagText, 0, (strrchr($tagText, '/') - 1)));

216 $this->fireStartElementEvent($tagText, $myAttributes);

217 $this->fireEndElementEvent($tagText);

checkbase.php (https://github.com/brandonburke/WordPress-Plugin-Baseline.git) PHP · 144 lines

1 <?php

2 // main global to hold our checks

3 global $themechecks;

12 {

13 // should return true for good/okay/acceptable, false for bad/not-okay/unacceptable

14 public function check( $php_files, $css_files, $other_files );

15

16 // should return an array of strings explaining any problems found

20 // load all the checks in the checks directory

21 $dir = 'checks';

22 foreach (glob(dirname(__FILE__). "/{$dir}/*.php") as $file) {

23 include $file;

24 }

116 return array($left, $right);

117 } else {

118 if(strrchr($haystack, $needle)) return array('', substr(strrchr($haystack, $needle), $r_inclusive));

119 else return false;

120 }

imgresize.php (https://github.com/matoyan/ConbuMusubi.git) PHP · 124 lines

1 <?php

2 # 画像サイズの変換

3 # サイズが分かる場合(保留):xsize, ysize

61

62 // リサイズして保存

63 $ftype=strrchr($fname, "."); // 拡張子から

64

65 if(strcasecmp($ftype, ".png")==0){

107

108 function print_img($imgname){

109 $ftype=strrchr($imgname, ".");

110 $type="Content-type: image/";

111 if(strcasecmp($ftype, ".png")==0){

index.php (https://github.com/damko/RestIgniter-hmvc.git) PHP · 206 lines

1 <?php

2

3 /*

80 * --------------------------------------------------------------------

81 *

82 * Normally you will set your default controller in the routes.php file.

83 * You can, however, force a custom routing by hard-coding a

84 * specific controller class/function here. For most applications, you

99 // $routing['directory'] = '';

100

101 // The controller class file name. Example: Mycontroller.php

102 // $routing['controller'] = '';

103

113 * The $assign_to_config array below will be passed dynamically to the

114 * config class when initialized. This allows you to set custom config

115 * items or override any default config values found in the config.php file.

116 * This can be handy as it permits you to share one application between

117 * multiple front controller files, with each file containing different

Caster.php (https://gitlab.com/Sigpot/AirSpot) PHP · 118 lines

1 <?php

2

3 /*

58 $p[$i] = self::PREFIX_DYNAMIC.$k;

59 } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) {

60 $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0");

61 }

62 }

Plural.php (https://github.com/grandison/budo16.git) PHP · 177 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Plural.php 17439 2009-08-07 19:25:20Z thomas $

20 */

21

41

42 if (strlen($locale) > 3) {

43 $locale = substr($locale, 0, -strlen(strrchr($locale, '_')));

44 }

45

sorting.php (https://bitbucket.org/dbogicevic/daki-projects.git) PHP · 107 lines

1 <?php

2 $dirFiles = array();

3 // opens images folder

13 // hides folders, writes out ul of images and thumbnails from two folders

14

15 if ($file != "." && $file != ".." && $file != "index.php" && $file != "Thumbnails") {

16 $dirFiles[] = $file;

17 }

34

35

36 <?php

37

38 /* function: generates thumbnail */

69

70 function get_file_extension($file_name) {

71 return substr(strrchr($file_name,'.'),1);

72 }

73

Util.php (https://github.com/luoqi1987425/weflex.git) PHP · 221 lines

1 <?php

2 class WeFlex_Util

3 {

107 if(strstr($price , '.' )){

108 $rtn = str_replace(".", ",", $price);

109 $length = strlen(substr(strrchr( $rtn, "," ) , 1));

110 if( $length < 2 ){

111

pam_static.c (https://github.com/rhuitl/uClinux.git) C · 140 lines

48 if (strchr(clpath, '/')) {

49 /* ignore path and leading "/" */

50 clpath = strrchr(path, '/') + 1;

51 }

52 /* create copy to muck with (must free before return) */

index.php (https://bitbucket.org/uzielgl/agente.git) PHP · 210 lines

1 <?php

2

3 /*

80 * --------------------------------------------------------------------

81 *

82 * Normally you will set your default controller in the routes.php file.

83 * You can, however, force a custom routing by hard-coding a

84 * specific controller class/function here. For most applications, you

113 * The $assign_to_config array below will be passed dynamically to the

114 * config class when initialized. This allows you to set custom config

115 * items or override any default config values found in the config.php file.

116 * This can be handy as it permits you to share one application between

117 * multiple front controller files, with each file containing different

201 */

202

203 require_once('FirePHPCore/FirePHP.class.php');

204 ob_start();

205 $fp= FirePHP::getInstance(true);

Abstract.php (https://github.com/grandison/budo16.git) PHP · 98 lines

1 <?php

2 /**

3 * SocialEngine

7 * @copyright Copyright 2006-2010 Webligo Developments

8 * @license http://www.socialengine.net/license/

9 * @version $Id: Abstract.php 7244 2010-09-01 01:49:53Z john $

10 * @author John

11 */

58 {

59 if( null === $this->_fieldTableType ) {

60 $this->_fieldTableType = strtolower(trim(strrchr(get_class($this), '_'), '_'));

61 }

62 return $this->_fieldTableType;

display_select_lang.lib.php (https://github.com/cabenitez/factuweb.git) PHP · 110 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

4 * Code for displaying language selection

5 *

6 * @version $Id: display_select_lang.lib.php 11449 2008-08-01 19:00:36Z lem9 $

7 */

8 if (! defined('PHPMYADMIN')) {

31 ?>

32

33 <form method="post" action="index.php" target="_parent">

34 <?php

58

59 <select name="lang" onchange="this.form.submit();" xml:lang="en" dir="ltr">

60 <?php

61

62 uasort($GLOBALS['available_languages'], 'PMA_language_cmp');

g3hack.c (https://github.com/rhuitl/uClinux.git) C · 185 lines

18

19 #ifdef BSD

20 #define strrchr rindex

21 #endif

22

145 int nlines = 10;

146

147 if ((progname = strrchr(argv[0], '/')) == NULL)

148 progname = argv[0];

149 else

adjust_bbcodes.php (https://github.com/naderman/phpbb-orchestra.git) PHP · 174 lines

1 <?php

2 /**

3 * Only adjust bitfields, do not rewrite text...

11 set_time_limit(0);

12

13 define('IN_PHPBB', true);

14 $phpbb_root_path = './../';

15 $phpEx = substr(strrchr(__FILE__, '.'), 1);

16 include($phpbb_root_path . 'common.'.$phpEx);

17 include($phpbb_root_path . 'includes/message_parser.' . $phpEx);

18

19 // Start session management

rmdirp.c (https://github.com/richlowe/illumos-gate.git) C · 141 lines

58 char *slash;

59

60 slash = strrchr(d, '/');

61 currstat = stat64(".", &cst);

62

79 /* If extra / in the end */

80 if (slash != d) {

81 if (++slash == strrchr(d, '\0')) {

82 *(--slash) = '\0';

83 slash = strrchr(d, '/');

126 /* Go backward to next directory */

127 *slash = '\0';

128 slash = strrchr(d, '/');

129 }

130 *d1 = '\0';

system.h (https://github.com/randy1/DragonFlyBSD.git) C Header · 207 lines

153 # undef strchr

154 # define strchr index

155 # undef strrchr

156 # define strrchr rindex

glob_wrapper.c (https://github.com/gmphp/PHP.git) C · 291 lines

48 } glob_s_t;

49

50 PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS_DC) /* {{{ */

51 {

52 glob_s_t *pglob = (glob_s_t *)stream->abstract;

70 /* }}} */

71

72 PHPAPI char* _php_glob_stream_get_pattern(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS_DC) /* {{{ */

73 {

74 glob_s_t *pglob = (glob_s_t *)stream->abstract;

92 /* }}} */

93

94 PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_DC TSRMLS_DC) /* {{{ */

95 {

96 glob_s_t *pglob = (glob_s_t *)stream->abstract;

208 /* {{{ php_glob_stream_opener */

209 static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *path, char *mode,

210 int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)

mb_wrapper.php (https://github.com/wangaiying/elgg4ysu.git) PHP · 233 lines

1 <?php

2

3 // if mb functions are available, set internal encoding to UTF8

98

99 /**

100 * Wrapper function for mb_strrchr(). Falls back to strrchr() if

101 * mb_strrchr() isn't available. Parameters are passed to the

106 * @since 1.7.0

107 */

108 function elgg_strrchr() {

109 $args = func_get_args();

110 if (is_callable('mb_strrchr')) {

111 return call_user_func_array('mb_strrchr', $args);

112 }

113 return call_user_func_array('strrchr', $args);

faq.php (https://github.com/VSEphpbb/phpbb.git) PHP · 117 lines

4 * This file is part of the phpBB Forum Software package.

5 *

6 * @copyright (c) phpBB Limited <https://www.phpbb.com>

7 * @license GNU General Public License, version 2 (GPL-2.0)

8 *

17 define('IN_PHPBB', true);

18 $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

19 $phpEx = substr(strrchr(__FILE__, '.'), 1);

20 include($phpbb_root_path . 'common.' . $phpEx);

21

22 // Start session management

113 'body' => $template_file)

114 );

115 make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

116

117 page_footer();

armksyms.c (https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git) C · 197 lines

111 EXPORT_SYMBOL(strnlen);

112 EXPORT_SYMBOL(strpbrk);

113 EXPORT_SYMBOL(strrchr);

114 EXPORT_SYMBOL(strstr);

115 EXPORT_SYMBOL(memset);

flashgallery.php (https://github.com/picoder/Deltus.git) PHP · 108 lines

1 <?php

2 $allowed_formats = array("jpg", "jpeg", "JPG", "JPEG", "png", "PNG");

3 $exclude_files = array(

91 <pics>';

92

93 $directory= $_SERVER['HTTP_HOST'] .$_SERVER['PHP_SELF'];

94 $directory=dirname($directory);

95

96 foreach ($listDir as $val)

97 {

98 $title = substr(strrchr($val, '/'), 1);

99 $title=encoding($title);

100 $val=encoding($val);

index.php (https://bitbucket.org/glaucomunsberg/kenobi.git) PHP · 205 lines

1 <?php

2 header('Content-Type: text/html; charset=utf-8');

3 /*

80 * --------------------------------------------------------------------

81 *

82 * Normally you will set your default controller in the routes.php file.

83 * You can, however, force a custom routing by hard-coding a

84 * specific controller class/function here. For most applications, you

113 * The $assign_to_config array below will be passed dynamically to the

114 * config class when initialized. This allows you to set custom config

115 * items or override any default config values found in the config.php file.

116 * This can be handy as it permits you to share one application between

117 * multiple front controller files, with each file containing different

163 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

164

165 // The PHP file extension

166 // this global constant is deprecated.

167 define('EXT', '.php');

armksyms.c (https://gitlab.com/oyvholm/linux) C · 185 lines

86 /* string / mem functions */

87 EXPORT_SYMBOL(strchr);

88 EXPORT_SYMBOL(strrchr);

89 EXPORT_SYMBOL(memset);

90 EXPORT_SYMBOL(__memset32);

manager.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 160 lines

1 <?php

2 class ControllerExtensionManager extends Controller {

3 public function index() {

45

46 if (!empty($this->request->files['file']['name'])) {

47 if (strrchr($this->request->files['file']['name'], '.') != '.zip') {

48 $json['error'] = $this->language->get('error_filetype');

49 }

129 }

130 }

131 } elseif (strrchr(basename($file), '.') == '.sql') {

132 //file_get_contents($file);

133 } elseif (strrchr(basename($file), '.') == '.xml') {

ea.h (https://bitbucket.org/pizzafactory/binutils.git) C Header · 137 lines

114 size_ea_t strcspn_ea (__ea const char *s, const char *reject);

115 __ea char *strpbrk_ea (__ea const char *s, const char *accept);

116 __ea char *strrchr_ea (__ea const char *s, int c);

117 size_ea_t strspn_ea (__ea const char *s, const char *accept);

118 __ea char * strstr_ea (__ea const char *s1, __ea const char *s2);

OpenGraph.php (https://github.com/FlusherDock1/Gutenberg.git) PHP · 226 lines

1 <?php

2

3 namespace Embed\Providers;

91

92 if (strpos($type, ':') !== false) {

93 $type = substr(strrchr($type, ':'), 1);

94 }

95

121 $video = $this->normalizeUrl($this->bag->get($name));

122

123 if (!($videoPath = parse_url($video, PHP_URL_PATH)) || !($type = pathinfo($videoPath, PATHINFO_EXTENSION))) {

124 $type = $this->bag->get('video:type');

125 }

LiveDocx.php (https://github.com/basdog22/Qool.git) PHP · 415 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: LiveDocx.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

78 *

79 * {code}

80 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

81 * array (

82 * 'username' => 'myUsername',

94 *

95 * {code}

96 * $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(

97 * array (

98 * 'username' => 'myUsername',

planet_compensate.php (https://github.com/myrtus/SuperNova.git) PHP · 183 lines

1 <?php

2 define('INSIDE' , true);

3 define('INSTALL' , false);

4 define('IN_ADMIN', true);

5

6 require('../common.' . substr(strrchr(__FILE__, '.'), 1));

7

8 if($user['authlevel'] < 3)

13 $template = gettemplate('admin/planet_compensate', true);

14

15 // http://localhost/admin/t.php?g=1&s=19&p=10&g1=1&s1=2&p1=8&u=gorlum&f=1.1&c=1

16

17 $galaxy_src = sys_get_param_int('galaxy_src');

index.php (https://github.com/robbyrice/school_legacy.git) PHP · 207 lines

1 <?php

2

3 setlocale(LC_TIME, 'fra', 'fr_FR', 'fr_FR.utf8');

82 * --------------------------------------------------------------------

83 *

84 * Normally you will set your default controller in the routes.php file.

85 * You can, however, force a custom routing by hard-coding a

86 * specific controller class/function here. For most applications, you

115 * The $assign_to_config array below will be passed dynamically to the

116 * config class when initialized. This allows you to set custom config

117 * items or override any default config values found in the config.php file.

118 * This can be handy as it permits you to share one application between

119 * multiple front controller files, with each file containing different

165 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

166

167 // The PHP file extension

168 // this global constant is deprecated.

169 define('EXT', '.php');

ttyslot.c (https://gitlab.com/storedmirrors/minix) C · 98 lines

76 if ((p = strstr(name, "/pts/")) != NULL)

77 ++p;

78 else if ((p = strrchr(name, '/')) != NULL)

79 ++p;

80 else

FileSystem.php (https://bitbucket.org/ponikrf/vfileviewer.git) PHP · 168 lines

1 <?php

2 /**

3 * Class to operate the file system

87 {

88 case 'name':

89 $fileinfo['name'] = substr(strrchr($filePath, DIRECTORY_SEPARATOR), 1);

90 break;

91 case 'server_path':

Extension.php (https://github.com/israelnoguera/parejas.git) PHP · 125 lines

1 <?php

2

3 namespace Symfony\Component\HttpKernel\DependencyInjection;

92 throw new \BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');

93 }

94 $classBaseName = substr(strrchr($className, '\\'), 1, -9);

95

96 return Container::underscore($classBaseName);

generate-standalone.php (https://github.com/kennethjiang/Wolke.git) PHP · 152 lines

84

85 /**

86 * Copies a file to another location recursively, if it is a PHP file

87 * remove includes

88 * @param string $file Original file

91 function copy_and_remove_includes($file, $sfile) {

92 $contents = file_get_contents($file);

93 if (strrchr($file, '.') === '.php') $contents = replace_includes($contents);

94 return file_put_contents($sfile, $contents);

95 }

114

115 echo 'Generating includes file... ';

116 shell_exec('php generate-includes.php');

117 echo "done!\n";

118