php Programming Glossary: pathinfo
multi image upload wrong quantity on file-upload http://stackoverflow.com/questions/10170277/multi-image-upload-wrong-quantity-on-file-upload i fileErr _FILES 'image' 'error' i fileExt strtolower pathinfo fileName PATHINFO_EXTENSION Dateiendung überprüfen if in_array.. info fileBase basename _FILES 'image' 'name' i fileName pathinfo fileBase PATHINFO_FILENAME fileExt pathinfo fileBase PATHINFO_EXTENSION.. i fileName pathinfo fileBase PATHINFO_FILENAME fileExt pathinfo fileBase PATHINFO_EXTENSION fileTmp _FILES 'image' 'tmp_name'..
How to get file extension in PHP? [duplicate] http://stackoverflow.com/questions/10368217/how-to-get-file-extension-in-php use something that's actually designed for what you want pathinfo path _FILES 'image' 'name' ext pathinfo path PATHINFO_EXTENSION..
How do I determine the extension(s) associated with a MIME type in PHP? http://stackoverflow.com/questions/1147931/how-do-i-determine-the-extensions-associated-with-a-mime-type-in-php types if isset types types system_extension_mime_types ext pathinfo file PATHINFO_EXTENSION if ext ext file ext strtolower ext return..
How to extract a file extension in PHP? http://stackoverflow.com/questions/173868/how-to-extract-a-file-extension-in-php now . In fact it does exist but few people know it. Meet pathinfo ext pathinfo filename PATHINFO_EXTENSION This is fast efficient.. it does exist but few people know it. Meet pathinfo ext pathinfo filename PATHINFO_EXTENSION This is fast efficient reliable..
PHP Get File Name Without File Extension http://stackoverflow.com/questions/2183486/php-get-file-name-without-file-extension share improve this question As an alternative to pathinfo you can use basename Returns filename component of path Example..
use php scandir($dir) and get only images! http://stackoverflow.com/questions/3226519/use-php-scandirdir-and-get-only-images any unwanted extensions. If you use strpos fnmatch or pathinfo to get the extension is up to you. share improve this answer..
PHP - How to upload & Save Files with Desired name http://stackoverflow.com/questions/3509333/php-how-to-upload-save-files-with-desired-name share improve this question You can try this info pathinfo _FILES 'userFile' 'name' ext info 'extension' get the extension..
convert image to base64 encoding in php http://stackoverflow.com/questions/3967515/convert-image-to-base64-encoding-in-php 'data image jpg base64 ' I think that it should be type pathinfo path PATHINFO_EXTENSION data file_get_contents path base64 'data..
Get the current script file name http://stackoverflow.com/questions/4221333/get-the-current-script-file-name look like this... function chopExtension filename ext pathinfo filename PATHINFO_EXTENSION return preg_replace ' .' . preg_quote..
How to read large worksheets from large Excel files (27MB+) with PHPExcel? http://stackoverflow.com/questions/4666746/how-to-read-large-worksheets-from-large-excel-files-27mb-with-phpexcel _endRow return true return false echo 'Loading file ' pathinfo inputFileName PATHINFO_BASENAME ' using IOFactory with a defined..
How to convert all images to JPG format in PHP? http://stackoverflow.com/questions/5060835/how-to-convert-all-images-to-jpg-format-in-php in PNG format and also limited to 3 ext. path_parts pathinfo .. images DVDs . _POST 'logo_file' if path_parts 'extension'.. 350 494 intval _POST 'w' intval _POST 'h' thumb path . pathinfo img PATHINFO_FILENAME . _thumb switch img_info 2 case IMAGETYPE_GIF..
Resize images with PHP http://stackoverflow.com/questions/7393319/resize-images-with-php height old_file self PATH . this get_filename basename pathinfo old_file PATHINFO_FILENAME new_name sprintf s_ sx s.jpg basename..
Sort and display directory list alphabetically using opendir() in php http://stackoverflow.com/questions/884974/sort-and-display-directory-list-alphabetically-using-opendir-in-php get a more generic handling of file extensions with the pathinfo function too. You wouldn't need a hard coded array of extensions..
Unzip a file with php http://stackoverflow.com/questions/8889025/unzip-a-file-with-php script. file 'file.zip' get the absolute path to file path pathinfo realpath file PATHINFO_DIRNAME zip new ZipArchive res zip open..
Split a big txt file with php [closed] http://stackoverflow.com/questions/12406300/split-a-big-txt-file-with-php function splitData filename destination chunkSize pathInfo pathinfo filename handle fopen filename 'rb' counter 0 if handle.. counter filePart destination . DIRECTORY_SEPARATOR . pathInfo 'filename' . _ . counter . . . pathInfo 'extension' touch filePart.. . pathInfo 'filename' . _ . counter . . . pathInfo 'extension' touch filePart file_put_contents filePart fread..
Most Efficient Way to Create Thumbnails? http://stackoverflow.com/questions/3722370/most-efficient-way-to-create-thumbnails newwidth newheight exts array gif jpg jpeg png pathInfo pathinfo source ext trim strtolower pathInfo extension sourceImage.. jpg jpeg png pathInfo pathinfo source ext trim strtolower pathInfo extension sourceImage null Generate source image depending on..
|