Login   Register  
PHP Classes
elePHPant
Icontem

Case 97 error

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      File Upload System  >  All threads  >  Case 97 error  >  (Un) Subscribe thread alerts  
Subject:Case 97 error
Summary:tpl Not a Writable Folder
Messages:4
Author:Terry Kennedy
Date:2009-10-21 12:59:23
Update:2009-10-23 04:12:17
 

  1. Case 97 error   Reply  
Picture of Terry Kennedy
Terry Kennedy
2009-10-21 12:59:24
I keep getting the error "tpl Not a Writable Folder"

I've checked the permissions on the folder I have the class and test file loaded to and everything is set up correctly. What folder is the upload trying to write to?

Thanks,

TK

  2. Re: Case 97 error   Reply  
Picture of Biju
Biju
2009-10-22 03:58:38 - In reply to message 1 from Terry Kennedy
Hi Terry,

You should create a folder 'tpl' (Or you can give any name as you like - but you should edit the name of storage folder in the script). in the root or at the location where you placed the php file for upload script. This folder is the destination for storage of all uploaded files. You must keep this folder as writable.

Regards
Biju

  3. Re: Case 97 error   Reply  
Picture of Terry Kennedy
Terry Kennedy
2009-10-22 11:37:14 - In reply to message 2 from Biju
Thank you very much, that worked. Is it possible to upload file types other than images? I would like to upload PDF and CSV types as well.

Thanks again!

  4. Re: Case 97 error   Reply  
Picture of Biju
Biju
2009-10-23 04:12:17 - In reply to message 3 from Terry Kennedy
Hi, Terry

you can upload any type of files using this class. For this you need to do some simple customisation.
1. You need to specify possible file type extensions in the function call- $upfile->setExtensions('jpeg,jpg,png,gif,flv');- in the uploading file.

2. You need to add a block for the mime types of the required file type in the function 'is_typesupported' in the class file. Look in to the block for image file types.
===================================
if($fextn=='jpeg' || $fextn=='pjpeg' || $fextn=='jpg' || $fextn=='gif' || $fextn=='png')
{
$ftype_array = array("image/pjpeg","image/jpeg","image/gif","image/x-png","image/png");
if(in_array($ftype,$ftype_array))
{
$frmt_return = 1;
}
}

===============================

Regards
Biju