Code: Select all
$target_path = $target_path . basename( $_FILES['headshot']['name']);
if(move_uploaded_file($_FILES['headshot']['tmp_name'], $target_path)) {
$headshot = str_replace('/home/efarrell/public_html', '', $target_path);
}
Moderator: General Moderators
Code: Select all
$target_path = $target_path . basename( $_FILES['headshot']['name']);
if(move_uploaded_file($_FILES['headshot']['tmp_name'], $target_path)) {
$headshot = str_replace('/home/efarrell/public_html', '', $target_path);
}
Code: Select all
$target_path = $target_path . basename( $_FILES['headshot']['name']); Code: Select all
$extension = array_pop(explode('.', basename( $_FILES['headshot']['name']))); //get the file extension
$target_path = $target_path . $f_name .'-'. $f_name .'.'. $extension; //specify the target file location