if(isset($_POST['btn_shoes']))
{
if(isset($_FILES['img_shoes']))
{
$errors= array();
$file_name = $_FILES['img_shoes']['name'];
$file_size =$_FILES['img_shoes']['size'];
$file_tmp =$_FILES['img_shoes']['tmp_name'];
$file_type=$_FILES['img_shoes']['type'];
$file_ext=strtolower(end(explode('.',$_FILES['img_shoes']['name']))); //line 35
Asked
Active
Viewed 6,083 times
-6

FirstOne
- 6,033
- 7
- 26
- 45

Varinder Chahal
- 7
- 1
- 1
-
2What is your question? – Jonathan Lam Jul 26 '16 at 21:52
-
What is your version of PHP? – trincot Jul 26 '16 at 21:54
-
1separate out the `strtolower(end(explode(...` into separate lines rather than all-in-one – Professor Abronsius Jul 26 '16 at 21:57
1 Answers
1
This occurs because some PHP versions don't accept that you are passing a function directly to the another function.You must assign the function value to a variable and pass it to the strtolower function.See below:
$text = end(explode('.',$_FILES['img_shoes']['name']));
$file_ext=strtolower($text);

msantos
- 691
- 5
- 6