该文件是从数据库中查得,但是要在指定的文件夹中查找,,请详解..
----------------------------
$filename = "aa.txt"; //文件名
$path = "d:/test"; //路径
$dest = $path."/".$filename;if (file_exists($dest)) {
echo "文件存在";
}
----------------------------
$filename = "aa.txt"; //文件名
$path = "d:/test"; //路径
$dest = $path."/".$filename;if (file_exists($dest)) {
echo "文件存在";
}
@ $fp = fopen("$DOCUMENT_BOOT/../orders/orders.txt", "a", 1);
if (!$fp)
{
echo "<p><strong>Your order could not be processed at this time." ."please try again later.</strong></p></body></html>";
exit; }
$file_dir = "/public/www/download/";
if (!file_exists($file_dir . $file_name)) { //檢查文件是否存在
echo "文件找不到";
exit;
}
http://www.phpx.com/php/zh/