Mudsaf Posted November 21, 2012 Share Posted November 21, 2012 Hello, im wondering how to re-name or add example 1064 after the uploaded_filename. Does it work like $_FILES['file']['name' + 1935]? Link to comment Share on other sites More sharing options...
Don E Posted November 21, 2012 Share Posted November 21, 2012 You can use the rename() function to rename a file. As for adding to a file name, don't think your example would work. This is probably the proper way: $_FILES['file']['name'] . 1935; but this is what it's going to look like: mypicture.jpg1935 for example. Link to comment Share on other sites More sharing options...
thescientist Posted November 21, 2012 Share Posted November 21, 2012 Hello, im wondering how to re-name or add example 1064 after the uploaded_filename. Does it work like $_FILES['file']['name' + 1935]?This won't work. $_FILES is an array, and so are it's members, like 'file'. Even with the . syntax, you would basically be looking up this $_FILES['file']['name1935'] as an actual member. So best to just rename the file using actual native filesystem functions like Don E. showed you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now