Added: 8 months ago
From: phpacademy
Views: 4,161
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (12)

Sign In or Sign Up now to post a comment!
  • Hey Alex, thanks for the great tutorials. Why does this one work fine but the other tutorial on thenewboston's channel (tutorial 90-92) yield a "Undefined Index" error?

    I realized in that tutorial you started off by assigning variables to the files array like $name = $_FILES['file']['name'] whereas in this tutorial you started off with an IF ISSET statement and THEN assigned the variables within the IF statement. Could you say why this one works and the other doesn't anymore? Please respond!

  • To everyone complaining about the error, just pass it through anothe variable eg. $explode=explode('.',$file_nam­e); $file_ext=strtolower(end($expl­ode));

    Not the most correct way, but it does the job

  • Comment removed

  • Comment removed

  • you don't want to read the extension because it can be masked

  • howcome you dont get an error?

    Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\fileupload\ind­ex.php on line 7

  • @jakewestgomila

    i have the same problem !

    have You fixed it ?

  • @russel07crowe

    nope :(

  • 5:11 I got this:

    Fatal error: Function name must be a string in C:\xampp\htdocs\index.php on line 6

    anyone can help me. Thanx in advance guys !

  • @gentlxman you have to wrap the first parameter (the . in this case) in quotes "." for example

  • keeps saying strict standards:

    Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\CMS\admin\uplo­ad\index.php on line 7

    line 7 is: $file_ext = end(explode('.',$file_name));

    what did i do wrong? : / and great tutorials btw! :D

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more