Php code fix, .docx upload
- or -
Post a project like this898
£25/hr(approx. $31/hr)
- Posted:
- Proposals: 21
- Remote
- #3432041
- Awarded
♛ No. 1 ♛ UK's Professional Web Development , Web Designing, Magento , Shopify, WordPress , API Integration, Full-Stack Ruby on Rails Developer,Senior Front-End Developer (AngularJS / Node.js)
Chandigarh
WordPress Developer | PHP | Custom PHP Development | Any PHP Solution Provider | Coding
Ahmedabad
PPH Top 1% WordPress | Shopify | PHP | UI/UX | iOS/App | SEO |CRO| Webflow | Wix | Web Development
Karachi
Experienced SEO, Web, and Mobile App Developers - 18+ Years Expertise - PHP, WordPress, Shopify, Laravel, Node.js, React.js, Flutter, SEO, Digital Marketing, Responsive Design
Bay Minette
Web Development | Mobile Development | Wordpress| PHP | Woo-Commerce | Laravel
Surat
16018011700056543350566471952465004175381371264729204852656171206294615190151247494
Description
Experience Level: Expert
Estimated project duration: 1 day or less
Hi there,
My website has an update area where users can update a Word document when logged in.
.doc documents update, but .docx are no longer uploading when uploading from a Windows device.
I have added the relevant code below...
//if CV doc then upload - delete original file first
if ($JOBSEEKER['cv'] != '') $cvextension = substr($JOBSEEKER['cv'], -3, 3);
else $cvextension = "doc";
$cvfile = $_SESSION['jobseeker_id'] . "." . $cvextension;
if (isset($_FILES['cv']) && isset($_FILES) && is_array($_FILES['cv']) && $_FILES['cv']['name']) {
// code for firefox
$test_file_extension = substr($_FILES['cv']['name'], -3, 3);
if (($test_file_extension == "doc" || $test_file_extension == "rtf" || $test_file_extension == "ocx" || $test_file_extension == "docx") && ($_FILES['cv']['size'] cvdir . "/" . $cvfile;
copy($_FILES['cv']['tmp_name'], $fullcvfile) or die("Error - cannot upload CV - please go back and try again.");
}
}
/* if ($_FILES['cv']['size'] cvdir . "/" . $cvfile;
copy($_FILES['cv']['tmp_name'], $fullcvfile) or die("Error - cannot upload CV - please go back and try again.");
}
My website has an update area where users can update a Word document when logged in.
.doc documents update, but .docx are no longer uploading when uploading from a Windows device.
I have added the relevant code below...
//if CV doc then upload - delete original file first
if ($JOBSEEKER['cv'] != '') $cvextension = substr($JOBSEEKER['cv'], -3, 3);
else $cvextension = "doc";
$cvfile = $_SESSION['jobseeker_id'] . "." . $cvextension;
if (isset($_FILES['cv']) && isset($_FILES) && is_array($_FILES['cv']) && $_FILES['cv']['name']) {
// code for firefox
$test_file_extension = substr($_FILES['cv']['name'], -3, 3);
if (($test_file_extension == "doc" || $test_file_extension == "rtf" || $test_file_extension == "ocx" || $test_file_extension == "docx") && ($_FILES['cv']['size'] cvdir . "/" . $cvfile;
copy($_FILES['cv']['tmp_name'], $fullcvfile) or die("Error - cannot upload CV - please go back and try again.");
}
}
/* if ($_FILES['cv']['size'] cvdir . "/" . $cvfile;
copy($_FILES['cv']['tmp_name'], $fullcvfile) or die("Error - cannot upload CV - please go back and try again.");
}
Robert O.
100% (57)Projects Completed
61
Freelancers worked with
52
Projects awarded
47%
Last project
24 Jan 2024
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Hi Robert,
can you please share the URL?
Thanks
1002469
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies