• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP fix_strtolower函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fix_strtolower函数的典型用法代码示例。如果您正苦于以下问题:PHP fix_strtolower函数的具体用法?PHP fix_strtolower怎么用?PHP fix_strtolower使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fix_strtolower函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: die

include 'config/config.php';
if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager") {
    die('forbiden');
}
include 'include/utils.php';
include 'include/mime_type_lib.php';
if (strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== FALSE || strpos($_POST['path'], './') === 0) {
    die('wrong path');
}
if (strpos($_POST['name'], '/') !== FALSE) {
    die('wrong path');
}
$path = $current_path . $_POST['path'];
$name = $_POST['name'];
$info = pathinfo($name);
if (!in_array(fix_strtolower($info['extension']), $ext)) {
    die('wrong extension');
}
$img_size = (string) filesize($path . $name);
// Get the image size as string
$mime_type = get_file_mime_type($name);
// Get the correct MIME type depending on the file.
header('Pragma: private');
header('Cache-control: private, must-revalidate');
header("Content-Type: " . $mime_type);
// Set the correct MIME type
header("Content-Length: " . $img_size);
header('Content-Disposition: attachment; filename="' . $name . '"');
readfile($path . $name);
exit;
开发者ID:huuly188,项目名称:vietnamrealty,代码行数:30,代码来源:force_download.php


示例2: substr

         $file_path1 = $current_path . $rfm_subfolder . $subdir . $file1;
     }
     $filename = substr($file1, 0, '-' . (strlen($file_array['extension']) + 1));
     rename_file($file_path, fix_filename($filename, $transliteration), $transliteration);
     $file = $file1;
     $file_array['extension'] = fix_filename($file_array['extension'], $transliteration);
     $file_path = $file_path1;
 }
 $is_img = false;
 $is_video = false;
 $is_audio = false;
 $show_original = false;
 $show_original_mini = false;
 $mini_src = "";
 $src_thumb = "";
 $extension_lower = fix_strtolower($file_array['extension']);
 if (in_array($extension_lower, $ext_img)) {
     $src = $base_url . $cur_dir . rawurlencode($file);
     $mini_src = $src_thumb = $thumbs_path . $subdir . $file;
     //add in thumbs folder if not exist
     if (!file_exists($src_thumb)) {
         try {
             create_img_gd($file_path, $src_thumb, 122, 91);
             new_thumbnails_creation($current_path . $rfm_subfolder . $subdir, $file_path, $file, $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $relative_image_creation_option, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height, $fixed_image_creation_option);
         } catch (Exception $e) {
             $src_thumb = $mini_src = "";
         }
     }
     $is_img = true;
     //check if is smaller than thumb
     list($img_width, $img_height, $img_type, $attr) = getimagesize($file_path);
开发者ID:PotsonHumer,项目名称:OGS_V2,代码行数:31,代码来源:dialog.php


示例3: fix_filename

 if (in_array(fix_strtolower($info['extension']), $ext)) {
     $tempFile = $_FILES['file']['tmp_name'];
     $targetPath = $storeFolder;
     $targetPathThumb = $storeFolderThumb;
     $_FILES['file']['name'] = fix_filename($_FILES['file']['name']);
     if (file_exists($targetPath . $_FILES['file']['name'])) {
         $i = 1;
         $info = pathinfo($_FILES['file']['name']);
         while (file_exists($targetPath . $info['filename'] . ".[" . $i . "]." . $info['extension'])) {
             $i++;
         }
         $_FILES['file']['name'] = $info['filename'] . ".[" . $i . "]." . $info['extension'];
     }
     $targetFile = $targetPath . $_FILES['file']['name'];
     $targetFileThumb = $targetPathThumb . $_FILES['file']['name'];
     if (in_array(fix_strtolower($info['extension']), $ext_img)) {
         $is_img = true;
     } else {
         $is_img = false;
     }
     move_uploaded_file($tempFile, $targetFile);
     chmod($targetFile, 0755);
     if ($is_img) {
         $memory_error = false;
         if (!create_img_gd($targetFile, $targetFileThumb, 122, 91)) {
             $memory_error = false;
         } else {
             if (!new_thumbnails_creation($targetPath, $targetFile, $_FILES['file']['name'], $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height)) {
                 $memory_error = false;
             } else {
                 $imginfo = getimagesize($targetFile);
开发者ID:heruprasetya,项目名称:Codeigniter-SMS-Gateway-Gammu,代码行数:31,代码来源:upload.php


示例4: formatColor

 protected function formatColor($value)
 {
     $rgbArray = array();
     // *** If it's an array it should be R, G, B
     if (is_array($value)) {
         if (key($value) == 0 && count($value) == 3) {
             $rgbArray['r'] = $value[0];
             $rgbArray['g'] = $value[1];
             $rgbArray['b'] = $value[2];
         } else {
             $rgbArray = $value;
         }
     } else {
         if (fix_strtolower($value) == 'transparent') {
             $rgbArray = array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 127);
         } else {
             // *** ...Else it should be hex. Let's make it RGB
             $rgbArray = $this->hex2dec($value);
         }
     }
     return $rgbArray;
 }
开发者ID:WebPassions,项目名称:2015,代码行数:22,代码来源:php_image_magician.php


示例5: fix_filename

 $targetPathThumb = $storeFolderThumb;
 $_FILES['file']['name'] = fix_filename($_FILES['file']['name'], $transliteration);
 $file_name_splitted = explode('.', $_FILES['file']['name']);
 array_pop($file_name_splitted);
 $_FILES['file']['name'] = implode('-', $file_name_splitted) . '.' . $info['extension'];
 if (file_exists($targetPath . $_FILES['file']['name'])) {
     $i = 1;
     $info = pathinfo($_FILES['file']['name']);
     while (file_exists($targetPath . $info['filename'] . '_' . $i . '.' . $info['extension'])) {
         $i++;
     }
     $_FILES['file']['name'] = $info['filename'] . '_' . $i . '.' . $info['extension'];
 }
 $targetFile = $targetPath . $_FILES['file']['name'];
 $targetFileThumb = $targetPathThumb . $_FILES['file']['name'];
 if (in_array(fix_strtolower($info['extension']), $ext_img) && @getimagesize($tempFile) != false) {
     $is_img = true;
 } else {
     $is_img = false;
 }
 if ($is_img) {
     move_uploaded_file($tempFile, $targetFile);
     chmod($targetFile, 0755);
     $memory_error = false;
     if (!create_img_gd($targetFile, $targetFileThumb, 122, 91)) {
         $memory_error = false;
     } else {
         if (!new_thumbnails_creation($targetPath, $targetFile, $_FILES['file']['name'], $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height)) {
             $memory_error = false;
         } else {
             $imginfo = getimagesize($targetFile);
开发者ID:ortegon000,项目名称:tienda,代码行数:31,代码来源:upload.php


示例6: fix_strtolower

     $_FILES['file']['name'] = fix_strtolower($_FILES['file']['name']);
 }
 // Gen. new file name if exists
 if (file_exists($targetPath . $_FILES['file']['name'])) {
     $i = 1;
     $info = pathinfo($_FILES['file']['name']);
     // append number
     while (file_exists($targetPath . $info['filename'] . "_" . $i . "." . $extension)) {
         $i++;
     }
     $_FILES['file']['name'] = $info['filename'] . "_" . $i . "." . $extension;
 }
 $targetFile = $targetPath . $_FILES['file']['name'];
 $targetFileThumb = $targetPathThumb . $_FILES['file']['name'];
 // check if image (and supported)
 if (in_array(fix_strtolower($extension), $ext_img)) {
     $is_img = TRUE;
 } else {
     $is_img = FALSE;
 }
 if (!checkresultingsize($_FILES['file']['size'])) {
     response(sprintf(trans('max_size_reached'), $MaxSizeTotal) . AddErrorLocation(), 406)->send();
     exit;
 }
 // upload
 move_uploaded_file($tempFile, $targetFile);
 chmod($targetFile, 0755);
 if ($is_img) {
     $memory_error = FALSE;
     if (!create_img($targetFile, $targetFileThumb, 122, 91)) {
         $memory_error = FALSE;
开发者ID:Dipchikov,项目名称:bludit-plugins,代码行数:31,代码来源:upload.php


示例7: tobytes

 /**
  * Convert a value ending in 'G','M' or 'K' to bytes
  *
  */
 private function tobytes($val)
 {
     $val = trim($val);
     $last = fix_strtolower($val[strlen($val) - 1]);
     switch ($last) {
         case 'g':
             $val *= 1024;
         case 'm':
             $val *= 1024;
         case 'k':
             $val *= 1024;
     }
     return $val;
 }
开发者ID:duonghoaikhanh,项目名称:hondabac,代码行数:18,代码来源:jupload.php


示例8: get_uploaded_files_markup

    public static function get_uploaded_files_markup($results = array())
    {
        $lan_iso = Context::getcontext()->language->iso_code;
        include_once _PS_ROOT_DIR_ . '/modules/revsliderprestashop/views/config/config.php';
        // include_once(_PS_ROOT_DIR_.'/modules/revsliderprestashop/views/lang/'.$lan_iso.'.php');
        include_once _PS_ROOT_DIR_ . '/modules/revsliderprestashop/views/include/utils.php';
        $upload_dir = __PS_BASE_URI__ . 'modules/revsliderprestashop/uploads/';
        $current_path = _PS_ROOT_DIR_ . '/modules/revsliderprestashop/uploads/';
        $url = uploads_url();
        ob_start();
        if (!empty($results)) {
            ?>
                     <div id="divImageList" > <ul id="selectable" class="">
                     <?php 
            $num = 0;
            foreach ($results as $id => $filename) {
                //$img = $results[$num];
                $thumbsize = GlobalsRevSlider::IMAGE_SIZE_THUMBNAIL;
                $mediumsize = GlobalsRevSlider::IMAGE_SIZE_MEDIUM;
                $largesize = GlobalsRevSlider::IMAGE_SIZE_LARGE;
                $filerealname = substr($filename, 0, strrpos($filename, '.'));
                $fileext = substr($filename, strrpos($filename, '.'), strlen($filename) - strlen($filerealname));
                $thumbimg = $img = "{$filerealname}-{$thumbsize}x{$thumbsize}{$fileext}";
                $mediumimg = "{$filerealname}-{$mediumsize}x{$mediumsize}{$fileext}";
                $largeimg = "{$filerealname}-{$largesize}x{$largesize}{$fileext}";
                $file_path = $file_path = $current_path . $largeimg;
                $date = filemtime($file_path);
                $size = filesize($file_path);
                // $file_ext = substr(strrchr($file, '.'), 1);
                $file_infos = pathinfo($file_path);
                $file_ext = $file_infos['extension'];
                // $sorted[$k] = array('file' => $file, 'date' => $date, 'size' => $size, 'extension' => $file_ext);
                $extension_lower = fix_strtolower($file_ext);
                $is_img = true;
                list($img_width, $img_height, $img_type, $attr) = getimagesize($file_path);
                // if (++$num % 4 === 1):
                ?>
<li data-image="<?php 
                echo $filename;
                ?>
" data-large="<?php 
                echo $upload_dir . $img;
                ?>
" data-medium="<?php 
                echo $upload_dir . $img;
                ?>
" data-thumb="<?php 
                echo $upload_dir . $img;
                ?>
" class="ff-item-type-2 file">
		<figure data-type="img" data-name="1117858_1577750_graph-1024x1024.png">
			<a data-function="apply" data-field_id="" data-file="<?php 
                echo $upload_dir . $img;
                ?>
" class="link" href="javascript:void('')">
				<div class="img-precontainer">
										<div class="img-container">
						<span></span>
						<img alt="<?php 
                echo $img;
                ?>
" src="<?php 
                echo $upload_dir . $img;
                ?>
"  class="original "  >
					</div>
				</div>
				<div class="img-precontainer-mini original-thumb">
					<div class="filetype png hide">png</div>
					<div class="img-container-mini">
						<span></span>
						<img src="<?php 
                echo $upload_dir . $img;
                ?>
" class=" " alt="<?php 
                echo $img;
                ?>
 thumbnails">
											</div>
				</div>
							</a>
			<div class="box">
				<h4 class="ellipsis">
					<a data-function="apply" data-field_id="" data-file="<?php 
                echo $img;
                ?>
" class="link" href="javascript:void('')">
						<?php 
                echo $img;
                ?>
</a></h4>
			</div>
			<?php 
                $date = filemtime($current_path . $img);
                ?>
			<input type="hidden" class="date" value="<?php 
                echo $date;
                ?>
"/>
			<input type="hidden" class="size" value="<?php 
//.........这里部分代码省略.........
开发者ID:evgrishin,项目名称:se1614,代码行数:101,代码来源:base_admin.class.php


示例9: force_download

 function force_download()
 {
     include FMPATH . 'config/config.php';
     if ($_SESSION['RF']["verify"] != "RESPONSIVEfilemanager") {
         die('forbiden');
     }
     include FMPATH . 'include/utils.php';
     include FMPATH . 'include/mime_type_lib.php';
     if (strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== FALSE || strpos($_POST['path'], './') === 0) {
         die('wrong path');
     }
     if (strpos($_POST['name'], '/') !== FALSE) {
         die('wrong path');
     }
     $path = $current_path . $_POST['path'];
     $name = $_POST['name'];
     $info = pathinfo($name);
     if (!in_array(fix_strtolower($info['extension']), $ext)) {
         die('wrong extension');
     }
     $img_size = (string) filesize($path . $name);
     // Get the image size as string
     $mime_type = get_file_mime_type($path . $name);
     // Get the correct MIME type depending on the file.
     header('Pragma: private');
     header('Cache-control: private, must-revalidate');
     header("Content-Type: " . $mime_type);
     // Set the correct MIME type
     header("Content-Length: " . $img_size);
     header('Content-Disposition: attachment; filename="' . $name . '"');
     readfile($path . $name);
     exit;
 }
开发者ID:nurulimamnotes,项目名称:pusakacms,代码行数:33,代码来源:Panel.php



注:本文中的fix_strtolower函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fix_strtoupper函数代码示例发布时间:2022-05-15
下一篇:
PHP fix_string函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap