I'm running PHP with Apache on a Linux machine. I have a page that uses the PHP functions 'file_exists' and 'fdopen'. Some of the filenames contain spaces. How do I come up with the right syntax so that these functions work with this type of filename?
Among other attempts this is the latest:
This appeears to be OS dependent (it works, without the extra quotes, under the Windows based OpenSA). Is there way to make it OS independent? TIA.
Among other attempts this is the latest:
Code:
.
.
.
elseif (file_exists("'".$dirname."/".$filename.".txt'")) {
$fid=fopen("'".$dirname."/".$filename.".txt'","r");
.
.
.