PHP Write Web Project Solution

Source: Internet
Author: User
PHP Write Web Project
Write a Web project, the page JS is separate to put out in a JS file is better, or directly written in the HTML page is better? What are the pros and cons? Php?js? Web HTML PHP JS


------Solution--------------------
In any case, demand is always the first place!
Now that you have used the path in JS, and you are not willing to change to a relative path
Is it not necessary to discuss the built-in or the outreach?
Of course, you can also embed the standalone JS file as a sub-template into the main template
------Solution--------------------
You can create a dedicated path to the JS file, which defines all the path variables, and other JS files using this file to define the path variable. Then this special storage path JS file before the other JS files can be introduced.
As defined Path.js
Inside the definition of var filepath= "* * *";
The filepath is then used as a path in other files.
When used, it is defined in the page:

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.