duanmiexi2275 2017-09-16 20:31
浏览 64
已采纳

Webserver使用旧的非现有文件来呈现网站

I've got my files uploaded to my website. When I view the website, the online html looks like this: enter image description here

However, that's definitely not the file that is online. I've tried to update it many times. However, it still renders a file that I was using a long time ago. I tried to removes my cache and cookies. But for some weird reason, it still manages to use an old deleted file... why is that?

The html that should be online looks like this:

{% extends "layout.html.twig" %}

{% block content %}

<div id="preloader"></div>

<div id="s1" class="hero">
    <div id="menu_block" name="menu_block" class="menu_block right">
        <nav class="nav_block">
            <a href="#s1">Home</a>
            <a href="#s2">About</a>
            <a href="#s3">Projects</a>
            <a href="#s4">Skills</a>
            <a href="#s5">Resume</a>
            <a href="#s6">Contact</a>
        </nav>
    </div>

    <div class="container vertical center">
        <div class="title white">
            Lex de Willigen
        </div>
        <div class="subtitle white">
            DEVELOPER
        </div>
        <div class="subsubtitle">
            <i>Hello, my name is Lex and I'm <br>
            a developer from the Netherlands!</i>
        </div>
    </div>
</div>

<div id="s2" class="section">
    <div class="container vertical center" style="margin-top: 10px;">
        <i class="fa fa-user fa-4x"></i>
    </div>
    <div class="container vertical center" style="">
        <h2 style="font-weight: 900; font-family: arial; color: black;">
            WHO AM I?
        </h2>
    </div>
    <div class="container vertical center" style="">
        <p>
            <b>Hi!</b> My name is Lex. 
            <h3 class="animate">And I'm developer</h3>
        </p>
    </div>
</div>

<div id="s3" class="section">
    <div class="container vertical center" style="">
        <h2>
            Projects
        </h2>
    </div>
</div>

<div id="s4" class="section">
    <div class="container vertical center" style="">
        <h2>
            Skills
        </h2>
    </div>
</div>

<div id="s5" class="section">
    <div class="container vertical center" style="">
        <h2>
            Resume
        </h2>
    </div>
</div>

<div id="s6" class="section">
    <div class="container vertical center" style="width: 50%;">
        <h2>
            Contact
        </h2>

        {% if form is defined %}
            <form action="" method="post">
                {{ form_widget(form) }}
            </form>
        {% endif %}
    </div>
</div>
{% endblock %}

Some extra details:

  1. I'm using the Silex framework
  2. For some reason, I never get my javascript working, though that might be because the new files are never loaded
  3. When needed, I could give my website in case you would want to check what might be the problem
  • 写回答

1条回答 默认 最新

  • doutu6616 2017-09-16 20:34
    关注

    Your server side Cache. Kindly check php.ini whether opcache expiry time is set for too long.

    • Opcache can cache.

    • Nginx web server cache.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?