Forums

PHP

This topic is locked

Pure PHP upload - Must set new file name?

Posted 12 Mar 2007 16:16:40
1
has voted
12 Mar 2007 16:16:40 Stephen Akins posted:
When I set newname the script works, when I don't I get a permissions error.

$ppu = new pureFileUpload();
$ppu->debugger = true;
$ppu->path = "fileemail";
// $ppu->newname = "test.pdf";
$ppu->extensions = "";
$ppu->formName = "frm_upload";
$ppu->storeType = "file";
$ppu->sizeLimit = "10000000";
$ppu->nameConflict = "uniq";
$ppu->requireUpload = "true";
$ppu->minWidth = "";
$ppu->minHeight = "";
$ppu->maxWidth = "";
$ppu->maxHeight = "";
$ppu->saveWidth = "";
$ppu->saveHeight = "";
$ppu->timeout = "600";
$ppu->progressBar = "";
$ppu->progressWidth = "300";
$ppu->progressHeight = "100";
$ppu->checkVersion("2.1.3";
$ppu->doUpload();



Output:

PHP version(4.4.1)
path(fileemail)
newname()
extensions()
redirectURL()
storeType(file)
sizeLimit(10000000)
nameConflict(uniq)
minWidth()
minHeight()
maxWidth()
maxHeight()
saveWidth()
saveHeight()
timeout(600)
Setting timeout
fullPath = fileemail/
Check path
Starting to progress files
field = fil_upload
filename = dewatering_1.jpg
CleanUp FileName
new filename = dewatering_1.jpg
Checking fileSize
Moving the file to the destination
source = C:\PHP\uploadtemp\php4158.tmp
destination =
Checking permissions
Not enough permissions

File can not be created,
Set the permissions of the parentmap correctly
Please correct and try again

Reply to this topic