Detecting the file extension

Ads
 

Detecting the file extension

How to detect the file extension in PHP?

View Answers

August 11, 2011 at 4:01 PM

Read the given tutorial to detect the file extension in PHP.

The fileexists() function, fileexists php, file_exists in php


August 12, 2011 at 3:09 PM

Here is the code for find Ext. of a file.

        <?php
        $filename = "filename.ext";  
        $a = explode('.',$filename);
        $c = count($a);
        $c = $c - 1;
        $ext = $a[$c];
        echo $ext;
        ?>

Regards, Kalpesh Shah.

Ads









Related Tutorials/Questions & Answers:
Detecting the file extension
Detecting the file extension   How to detect the file extension in PHP?   Read the given tutorial to detect the file extension in PHP. The fileexists() function, fileexists php, file_exists in php
Setting file extension
Setting file extension  Hi, I have used FileChooser to save a file. When I was trying to save it, the extension of the file is showing 'File'. How can I save that file to .xls ? Thanks
Advertisements
how to get file extension in java
how to get file extension in java  Hi, I want to get the file extension in Java. how to get file extension in java? Thanks   Hi, Here is sample code to get file extension in Java: package examples; import
how to open a file of .110 extension??
how to open a file of .110 extension??  I have a file which is in .110 extension and that file is belongs to Nokia 1100 mobile. How to open that kind of file format? Do i need any converter to open that? So that i can understand
Which extension i use for save hibernate file.
Which extension i use for save hibernate file.   Please give me answer that which extension i use for save the hibernate file and how i run that file as well as complie that file.   hi friend, Naming convention
chrome extension
chrome extension  how to develop an extension in google chrome for irctc next generation tatkal ticket booking
Version of excalibur-extension>excalibur-extension dependency
List of Version of excalibur-extension>excalibur-extension dependency
Version of loom-extension>loom-extension dependency
List of Version of loom-extension>loom-extension dependency
File
File  How to create .Exe file in jana
Version of avalon-extension>avalon-extension-impl dependency
List of Version of avalon-extension>avalon-extension-impl dependency
Version of avalon-extension>avalon-extension-spi dependency
List of Version of avalon-extension>avalon-extension-spi dependency
file
file  how can copy the information in the file to the string?   Store file data into String
file
file  how can add the information to the graphic file
file
file  Hi,what can delet some of the information of the file
file
file  Hi,how can delet some of the information of the file
File
File   How to find all files in our local computer using java
FILE
FILE  There is a file named Name.txt that contains information related to appliances.I want to read the contents of this file and I used the code... args[]) { try { File file=new File("Name.txt"); FileReader f=new FileReader(file
ModuleNotFoundError: No module named 'extension'
ModuleNotFoundError: No module named 'extension'  Hi, My Python... 'extension' How to remove the ModuleNotFoundError: No module named 'extension' error? Thanks   Hi, In your python environment you
FILE CONCEPT
FILE CONCEPT  Prompt the user to enter the name of a text file to search for. If the name does not end in a .txt extension, display an error message. Search for this file in the current directory. If the file does not exist print
file
file  hi i want read special line of file. what am i doing ? I write... read data from file. please help me! void maketree(BtNode root,int i) throws... at the following link: Read specific line from file
Opening files with .jnlp extension on browser!?!?!
Opening files with .jnlp extension on browser!?!?!  I working... file which gets downloaded on client's side on runtime. I searched into the code... where is has been used. I dont want this file to be downloaded into the client's pc
Artifacts of avalon-extension
List of Artifacts of avalon-extension maven depenency
Artifacts of excalibur-extension
List of Artifacts of excalibur-extension maven depenency
Artifacts of loom-extension
List of Artifacts of loom-extension maven depenency
Maven Dependency excalibur-extension >> 1.0
You should include the dependency code given in this page to add Maven Dependency of excalibur-extension >> excalibur-extension version1.0 in your project
Maven Dependency loom-extension >> 1.0-rc2
You should include the dependency code given in this page to add Maven Dependency of loom-extension >> loom-extension version1.0-rc2 in your project
Maven Dependency loom-extension >> 1.0-rc3
You should include the dependency code given in this page to add Maven Dependency of loom-extension >> loom-extension version1.0-rc3 in your project
Version of batik>batik-extension dependency
List of Version of batik>batik-extension dependency
Version of excalibur>excalibur-extension dependency
List of Version of excalibur>excalibur-extension dependency
Version of spice>spice-extension dependency
List of Version of spice>spice-extension dependency
Version of com.pastdev>jsch-extension dependency
List of Version of com.pastdev>jsch-extension dependency

Ads