PHP Parse error: syntax error, unexpected T
hi i am getting an error during my execution of the code : PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:apache2triadhtdocsimagedisplay.php on line 28
<?php
$dir= "C:apache2triadhtdocsphppgadminimagesphpimages";
$file_display= array('jpg', 'jpeg', 'png', 'gif');
if(file_exists($dir)== false)
{
echo "directory x not found";
}
else
{
$dir_content= scandir($dir);
foreach($dir_content as $file)
{
$file_type = strtolower(end(explode('.', $file)));
// echo "$file <br> ";
if($file !=='.' && $file !=='..')
{
//echo "$file <br> ";
echo "<img src="', $dir, '/', $file, '" alt="', $file, '"/>";
}
}
}
?>
please help
echo "<img src="', $dir, '/', $file, '" alt="', $file, '"/>";
^^-- here
你基本上有两个不同的字符串背对背,使这条线完全无效。
链接地址: http://www.djcxy.com/p/11970.html上一篇: 语法错误意外T
下一篇: PHP解析错误:语法错误,意外的T