Re: Specifying file paths in Windows
| From: | Todd Cary | Date: | Wed, 21 Jan 2004 15:09:59 +0000 |
| Subject: | Re: Specifying file paths in Windows | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175300@lists.php.net to get a copy of this message | ||
I found the problem: PDFlib is expecting the file name to be in the proper format for the system (Linux or NT). This is my patch:
$workdir = getcwd();
if ($use_unix)
$cl_absolute_image = $workdir . "/tiff/" . $cl_image;
else
$cl_absolute_image = $workdir . "\\tiff\\" . $cl_image;
Do you have a suggestion on a better way to do it?
Todd
Luke wrote:
try removing the dot and / so if (is_file("filedir/test.txt")) echo "Found it!"; else echo "Not found"; that should work on windows and unix platforms, i dont think windows likes the single dot, but you can use relative referencing, by just using the directory name.