Why can't I replace all paths with absolute paths?-php Tutorial

Source: Internet
Author: User
Why can't I replace all paths with absolute paths? chrome doesn't explain how I replace all images with absolute paths. F: why does wampwwwwebimgBoli.png why IE8 can explain why chrome cannot explain why include and require use the absolute path? ------ solution -------------------- you change to F :..... when the client browses, the drive does not have the file. Why can't I replace the path with the absolute path chrome?
I replaced all images with absolute paths F:/wamp/www/web/img/Boli.png. Why does IE8 explain why chrome cannot explain why include and require are using absolute paths?

------ Solution --------------------
When you switch to F: \... when the client browses, what should I do if there is no file on drive F?
Besides .. You are out of the browser .. Not good...
------ Solution --------------------
Discussion

Reference:
I wonder why I want to change to an absolute path?
Because the path in the include CSS file is used and the path in the PHP file is easy to make a mistake, I think that there is a difference between the absolute path and the relative path in Linux and windows. the code I wrote in windows is put into space. path in

------ Solution --------------------
Absolute paths greatly reduce project portability, or do not make good use of them!
The relative path is quite good.
------ Solution --------------------
Call the image on the client? It should be file: // F :/...

The absolute path used by require may be insecure.
------ Solution --------------------
There will be no F disks in Linux, and of course there will be errors.

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.