简体   繁体   中英

How do I include external files in PHP?

This code works perfectly, but I can not find how to include an external file.

www.free4g.me/-indexeddb/2.php

Can anyone show how to include a .php file of records?

<?php include_once 'PATH/TO/YOUR/FILE.php' ?>

OR

<?php require_once 'PATH/TO/YOUR/FILE.php' ?>

include = The file CAN be loaded, otherwise it will throw a notice.

require = The file HAS to be loaded, otherwise it will throw an error.

It's not possible include external files, per se.

PHP executes on your server. You'll need to put the www.free4g.me/-indexeddb/2.php file on your server, after which you can include it using the explanation provided by Xatenev.

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