Php code fix, .docx upload
- or -
Post a project like this1146
£25/hr(approx. $30/hr)
- Posted:
- Proposals: 21
- 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
Bay Minette
PPH Top 1% WordPress | Shopify | PHP | UI/UX | iOS/App | SEO |CRO| Webflow | Wix | Web Development
Karachi
★ WordPress Developer ★ Magento2 Developer ★ Opencart Developer ★ Prestashop Developer ★ Shopify Developer ★ Ecommerce Developer
Islamabad
Full-stack web developer, PHP, MySQL, Mobile App, AWS, Linux, Node.js, Vue.js, MongoDB, Joomla, Wordpress, E-Commerce, Git
London
♛ PPH No. #1 Team ♛ 21Years of Experience in Web Development , Web Designing, Magento , Shopify, WordPress , API Integration, Full-Stack Ruby on Rails Developer,AngularJS / Node.js
Chandigarh
Software Developer / System Administrator / Database Designer / Analyst / Programmer - Yorkshire
York
160180206294642076626561712920485785582638499417538111700057403565433501519015
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