
Php code fix, .docx upload
- or -
Post a project like this1324
£25/hr(approx. $34/hr)
- Posted:
- Proposals: 20
- Remote
- #3432041
- Awarded
Experienced SEO, Web, and Mobile App Developers - 18+ Years Expertise - PHP, WordPress, Shopify, Laravel, Node.js, React.js, Flutter, SEO, Digital Marketing, Responsive Design

PPH Top 1% WordPress | Shopify | PHP | UI/UX | iOS/App | SEO |CRO| Webflow | Wix | Web Development

★ WordPress Developer ★ Magento2 Developer ★ Opencart Developer ★ Prestashop Developer ★ Shopify Developer ★ Ecommerce Developer

Full-stack web developer, PHP, MySQL, Mobile App, AWS, Linux, Node.js, Vue.js, MongoDB, Joomla, Wordpress, E-Commerce, Git

♛ PPH No. #1 ♛ 21Years of Experience in Web Development , Web Designing, Magento , Shopify, WordPress , API Integration, Full-Stack Ruby on Rails Developer,AngularJS / Node.js


Software Developer / System Administrator / Database Designer / Analyst / Programmer - Yorkshire
Top rated PHP Web Development | WordPress | Magento | Drupal | OpenCart | PrestaShop | Joomla

160180420766265617129204857855826384994175381117000574035654335015190151050754




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