the same violators several times



  • head and footer is located in separate files... each of these files is connected with the same violin. <script type="text/javascript" src="xyz.js"></script>Also, there could be a connection to the same violin from a few more places... tell me if it's a big part? php-файловinclude(). such a mass connection of the same violin



  • The inclusion of the violin leads to its repetition several times. Clearly, this could lead to unpleasant side effects.
    For example, if this violin is tied to a certain element, application will be performed several times when applied. I don't think that's what you want.

    With regard to PHP It's a lot easier. You can easily connect the violin anywhere without thinking that it's gonna be connected a few times. For what? include() Use the function include_once()
    From http://php.net/manual/ru/function.include-once.php :

    Expression include_once includes and performs the file at the time The violin. His behavior is identical to that. It's only the difference that if the code from the file has already been activated once, it's not. will be switched on and repeated. As you can see from his name, he'll turn the file on. only once (include once).




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2