我想在该代码上使用我的自定义CSS样式,任何想法应该如何完成?
//Load modules
if ($handle = opendir('modules'))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$replace = preg_replace( array ('/(.*?)/', '/[-]/', '/.php/'), array ('$1', ' '), $file);
$result = ucfirst($replace);
echo '<a href="?inav=';
echo $replace;
echo '">';
echo $result;
echo '</a><br>';
}
}
closedir($handle);
我要插入:
<a href="?inav=" class="button101"><span class="user icon">
答案 0 :(得分:0)
只需添加您需要的回音:
//Load modules
if ($handle = opendir('modules'))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$replace = preg_replace( array ('/(.*?)/', '/[-]/', '/.php/'), array ('$1', ' '), $file);
$result = ucfirst($replace);
echo '<a href="?inav=';
echo $replace;
echo '"';
echo ' class="button101"';
echo '>';
echo $result;
echo '</a><br>';
}
}
closedir($handle);