[EdLUG] Help 3

Swithun Crowe swithun at swithun.servebeer.com
Fri May 1 16:31:47 UTC 2020


Hello

AR> When this is run. $audiofile is null.  Could someone explain  why ?  I
AR> copied an example from W3scools fpr graphics and changed variable name and
AR> file types.

AR> $target_file = $target_dir + basename($_FILES["fileToUpload"]["name"]);

In PHP, strings are concatenated using . rather than +. So the above line
should read:

$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);

Swithun.


More information about the EdLUG mailing list