ajaxCRUD.com

» a PHP class to create / read / update / delete from a database table using AJAX

   by loud canvas media

AjaxCRUD API Reference

<< Reference overview
<< Home

setFileUpload

allows a field to accept file uploads
void setFileUpload ( String fieldName, String serverUploadFolder, String WebUploadFolder )
This function allows a field (or multiple fields) in your table to allow file uploads. What this essentially means is that the field you set a to handle file uploads inserts the file's relative path to the file.

Note: you must chmod the folder to which you're uploading files to 777 (world writable)

Details

Type function
Returns web-safe filename of uploaded file (on upload

Parameters

fieldName
The field name you want to accept file uploads
serverUploadFolder
The full OR relative path to the folder which will contain the uploaded file(s) on the server
webUploadFolder
The relative and web accessible path to the folder which contains the uploaded file(s)

Example

$tblDemo->setFileUpload("fldFilename", "uploads/", "uploads/");

See also

New, Edit

 

"Sweet!!! One of the few packages that runs right out of the box. Just modify a couple of lines[s] [and] it runs perfectly."
~Mike