小编sre*_*sht的帖子

PHP包含HTML?

我有一个导航栏,图像和标题,我将在我的网站的每个页面中包含,所以我想使用php include在几个页面中引用此代码.但是,我认为我的语法可能有问题,或者因为它在加载时没有呈现任何内容.以下是一些代码段:

<!-- sample page --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html>  
<head>  
<?php include ('headings.php'); ?>
</head>
<body>
<?php include ('navbar.php'); ?>
<?php include ('image.php'); ?> 
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

navbar.php

    <?php 

    echo '<ul id="nav">
        <li>
            <a href="Home.html">Home</a>
        </li>
        <li>
            <a>About Me</a>
            <ul>
                <li>
                    <a href="Career.html">Career</a>
                </li>
                <li>
                    <a href="Coding.html">Coding</a>
                </li>
                <li>
                    <a href="Personal.html">Personal</a>
                </li>
            </ul>
        </li>
        <li>
            <a href="Travels.html">Travel</a>
        </li>
        <li>
            <a href="Contact.html">Contact</a>
        </li>
    </ul>';

    ?>
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助!

html php include

23
推荐指数
2
解决办法
14万
查看次数

创建一个没有重复VBA的新列?

我有一列单元格,其值如下所示:

a
a
b
b
c
c
c
c
d
e
f
f
Run Code Online (Sandbox Code Playgroud)

等等

我希望获取非重复值并将它们粘贴到新列中.我的伪代码如下:

ActiveSheet.Range("a1").End(xlDown).Select
aend = Selection.Row
for acol= 1 to aend
    ActiveSheet.Range("b1").End(xlDown).Select
    bend = Selection.Row
        'if Cells(1,acol).Value <> any of the values in the range Cells(2,1).Value
        'to Cells(2,bend).Value, then add the value of Cells(1,acol) to the end of 
        'column b.
Run Code Online (Sandbox Code Playgroud)

我的逻辑是否有意义?我不知道如何编写评论部分.如果这不是最有效的方法,那么有人会提出更好的方法吗?非常感谢!

excel vba excel-vba

1
推荐指数
1
解决办法
3万
查看次数

标签 统计

excel ×1

excel-vba ×1

html ×1

include ×1

php ×1

vba ×1