简体   繁体   中英

access files from outside root folder in godaddy

I have many websites having few same files like css, js etc. I have created few sub-domains also which again have many common files with main domain.

I am working on php By adding../ to every path: -on locolhost (xampp): lot of css have started working but images inside header.php (now its path is../inc/header.php) are not there, their 'div's are gone. -godaddy (linux -Ultimate Hosting plan) just plane html and after adding../ to every path, only header and footer links are visible as plane html enter image description here

You can't go outside root folder by../

I recommend to create a folder called common and put inside your files and call files in your pages in this way:

<link rel="stylesheet" href="your.domain/common/your.css">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM