K
K
kreativ_252019-05-30 15:03:47
IIS
kreativ_25, 2019-05-30 15:03:47

IIS - why is the script not connected in index.php?

I'm writing a website in Windows server 2016 (IIS) and there was a stupid problem - I can't include the vue.js script file in index.php.
If you connect via CDN everything works fine.

<script src="https://cdn.jsdelivr.net/npm/vue"></script>

It does not connect if the file is physically located in the site directory.
I've tried all the methods I know, but it doesn't help.
Interestingly, if the index file is made HTML, then the script is connected.
Added user IUSR and gave him write and read permissions.
The script file must be physically located in the site directory, because. this is a working project and should work without an internet connection.
Tell me, what can be done to connect the script file to the php index file in IIS?
Here is the test code:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>Тест</h1>

    <div id="app">
    {{ message }}
    </div>


    <script src="vue.js"></script>

    <script>
    var app = new Vue({
        el: '#app',
        data: {
            message: 'Привет!'
        }
    })
    </script>
</body>
</html>

5cefc615b058f275929951.jpeg
Test Site Structure:
5cefc75c932c6957334494.jpeg
Default Documents:
5cefe603bec6d475597341.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alstin, 2019-05-30
@alstin

in the settings you need to enable statics, the full answer is in the comments

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question