Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

resize the tiff file in php

Ads

 
 

Share on Google+Share on Google+

raja
resize the tiff file in php
1 Answer(s)      8 years ago
Posted in : WebSevices
Ads
View Answers

February 1, 2009 at 10:18 PM


Hi
I am sending the code of file upload in php. please check it, i hope it will help you...

FileUpload.php

<html>
<body>
<form action="Upload_File.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

Upload_File.php

<?php
if (($_FILES["file"]["type"] == "image/tiff") || ($_FILES["file"]["type"] == "image/tif")) {
if ($_FILES["file"]["error"] > 0){
echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
} else {
echo "File Name: " . $_FILES["file"]["name"] . "<br>";
echo "File Type: " . $_FILES["file"]["type"] . "<br>";
echo "File Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br>";
echo "Temp File: " . $_FILES["file"]["tmp_name"] . "<br>";

list($name,$extension)= split('[.]', $_FILES["file"]["name"]);

$imgname = $name.".gif";

echo "Image Extension changed: ". $imgname . "<br>";

if (file_exists("upload/" . $imgname)){
echo $imgname . " already exists. ";
} else {
move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $imgname);
echo "Stored in: " . "upload/" . $imgname;
}
}
} else {
echo "Invalid file";
}
?>

Thanks...

Ads









Related Tutorials/Questions & Answers:
resize the tiff file in php - WebSevices
resize the tiff file in php  please guide me how i resize the tiff... of file upload in php. please check it, i hope it will help you... FileUpload.php... if (($_FILES["file"]["type"] == "image/tiff") || ($_FILES["file"]["type
resize the tiff file - WebSevices
resize the tiff file  please guide me how i resize the tiff file and i want to upload it?   You can resize the tiff image as well as other type image. I am sending code, i hope it will help to you... Thanks
Advertisements
i want to resize tiff formated file in php - WebSevices
i want to resize tiff formated file in php  i know how to resize the jpeg,gif,png files but i need the code only for "tiff" files ? plz send guide lines for how to resize the tiff files?  Hi raja I could help better
i want to resize the tiff file also - WebSevices
i want to resize the tiff file also  if($objFiles['photo']['name...']); $FileName= time().$objFiles['photo']['name']; $this->resize_image...'],180,135); } function resize_image($src,$dest,$type,$new_width,$new
PHP GD Image Resize
<?php $file = 'images.jpg'; $save = 'new.jpg'; list($width, $height) = getimagesize($file) ; $modwidth = 100; $modheight = 100; $tn...($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight
Hot to Upload TIFF file to a sepcified location - JSP-Servlet
Hot to Upload TIFF file to a sepcified location  Hello everyone I have a serious doubt here which i need to solve as soon as possibe my query is i need to upload a TIFF file to a specified folder location on any other
convert tiff image to gif image - WebSevices
and resize the tiff image?" plz inform if there any idea?   Hi I am...:   Upload_File.php <?php if (($_FILES["file"]["type"] == "image/tiff") || ($_FILES["file"]["type"] == "image/tif")) { if ($_FILES
PHP duplicate file - PHP
PHP duplicate file   i wanted to duplicate a PHP file resides in different directory on submission
php download file script
php download file script  PHP script to download file in IE
php file search
php file search  How to search file in PHP .. $dir = '/tmp
change file permission in php
change file permission in php  How to change file permission in PHP
file_exists php not working
file_exists php not working  file_exists php not working. Please give me the simple example
PHP error uploading file - PHP
PHP error uploading file  I am getting error while uploading a file in a folder in PHP ... Warning: Cannot modify header information - headers already send any idea
PHP hide file path
PHP hide file path  PHP to read a path and convert that to the virtual link
php parse ini file
php parse ini file  I need a simple and easy example to Parsing an ?advanced? INI file with PHP
php download file code
php download file code  PHP code to download the files from the remote server
php download file browser
php download file browser  limiting downloading file system via browser only through my web application
php search file
php search file   I wanted to write a php script to list all the files available in either folder or sub folder
Multiple File Upload in PHP
Multiple File Upload in PHP  Hi, I am beginner in PHP scripting language. I am very interested to learn PHP application. So, can anyone explain or provide related reference about how to Multiple file upload in PHP. Thanks
Read external file in PHP
Read external file in PHP  How to read external files in PHP in particular time duration and save that file with the latest date. How is it possible? Please explain with an example. Thanks
Import MYSQL file in PHP - PHP
Import MYSQL file in PHP  i wanted to import the mysql file in PHP5 on button click. is it possible to do it? Is there any possibility of data security
Resize Header in CSS
Resize Header in CSS  Hi all, Please let me know if we can resize...;We can resize header tags in CSS .. and further call that class into you HTML file. h1{ font-size:60px;} h2{ font-size:48px;} h3{ font-size:36px
php download file from ftp
php download file from ftp  Need to download files from ftp using php. a simple example
php download file from url
php download file from url  how to download multiple files in PHP using the URL's
The file function example in PHP, file php, file in php
In this php tutorial section we will be learning the file() function of PHP...() function in PHP array file ( filename, [,flags [, context]] ) It returns...; the context  Code for file() in PHP <?php $ar1=file("c
Objective C resize UIImage
Objective C resize UIImage  i just want to resize the image on the touch detection. That means if a user double clicks on the UIImage it must resize the image
PHP Open Excel File in browser - PHP
PHP Open Excel File in browser  How we can open an excel file using PHP code. I don?t want to let the user to download it rather I would like to get it open in the web browser. Any help would be great. Thank you very much
PHP file_get_contents() Function
PHP file_get_contents() Function  Hi, How do i read the content of file using PHP program? So kindly provide any example or online help reference for filegetcontents() Function in PHP. Please feel free to suggest. Thanks
zip file upload in php - WebSevices
zip file upload in php  This is not a normal upload. we know the code for normal upload. i need the zip file upload code in php. how to upload zipfile using php? and how to unzip using php? please i dont
Check the File Exists in PHP Program
Check the File Exists in PHP Program  Hi, I trying to create a application to find or retrieve the existing files. So, Please help me or suggest any online reference that explain about the file exists function in PHP? Thanks
The file_exists() function, file_exists php, file_exists in php
PHP bool file_exists (file_name ) It test the existence of the file...() Function PHP  <?php echo "file is existing ".file... The file_exists() function returns TRUE if the file or directory