我尝试更改 joomlas 默认网站图标,我想将它放在我的网站的根目录中。我怎样才能做到这一点?
问问题
214 次
1 回答
0
根据Joomla 文档,html.php
查看favicontemplate
和root
文件夹。因此,如果您只是输入,它应该会显示出来root
。
// Try to find a favicon by checking the template and root folder
$path = $directory . DS;
$dirs = array( $path, JPATH_BASE . DS );
foreach ($dirs as $dir ) {
$icon = $dir . 'favicon.ico';
if (file_exists( $icon )) {
$path = str_replace( JPATH_BASE . DS, '', $dir );
$path = str_replace( '\\', '/', $path );
$this->addFavicon( JURI::base(true).'/'.$path . 'favicon.ico' );
break;''
于 2013-05-09T12:31:31.997 回答