This topic is locked

Renaming Uploaded Files

10/1/2010 7:23:47 AM
PHPRunner General questions
N
nitinjain authorDevClub member

Hello Support,
I am trying to upload some files and rename the same at the time of upload.
The following is the code that I am using



global $files_move;

$ext = strchr($values['itrfile'],".");

foreach( $files_move as $key=>$val)

{

if($val[0]==$_FILES["file_itrfile"]["tmp_name"])
$files_move[$key][1] = "files/".$values['assesee_name'].'-'.$values['asst_year'].'-'.$values['ack_no'].'-'.$values['type_of_return_new'].$ext;

}

$values["itrfile"] = $values['assesee_name'].'-'.$values['asst_year'].'-'.$values['ack_no'].'-'.$values['type_of_return_new'].$ext;


For some reason the file is never getting renamed.
Please help in this regards.
Nitin Jain

Sergey Kornilov admin 10/1/2010

Probably one of field names were misspelled.
You can post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.