What potential issue arises when using the header Content-Disposition in PHP for file downloads?

When using the header Content-Disposition in PHP for file downloads, a potential issue arises if the filename contains special characters or spaces. To solve this issue, you should use the `urlencode` function to encode the filename before setting it in the Content-Disposition header.

$filename = "my file with spaces.txt";
header("Content-Disposition: attachment; filename=\"" . urlencode($filename) . "\"");