PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I know that it's just because as soon as it hits the ' it just stops reading the filename but with echo etc you can play around with where you put quotation marks and which kind you use to make sure it still outputs the entire string.
I got it to work but urlencode(); didn't work since it tried to open a file with the encoded filename (doesn't exist and I'm not gonna change my filenames).
I used the same principle though, with htmlentities($somestring, ENT_QUOTES);
This worked a treat. The other advantage with htmlentities is that it doesn't try to save the file with a name full of encoded values, it just saves what it is actually called.
Thanks for getting me thinking in the right direction.