..


Sponsored Links

includes

Through the function includes a file you can include within a PHP script. It is not necessary to include the file has a. Php (can be, for example, a file. Html or. Txt).

It 'must specify the absolute or relative path of the file you want to include. It 'can also include remote files (by specifying the URL) provided that the directive allow_url_fopen is enabled.

Below are some examples:






 / / Includeo a file in the same folder







 includes "esempio.php";









 / / Include a file in the folder upstream







 include ".. / esempio.php";









 / / Include a file with absolute path







 include "/ path / to / file / esempio.php";









 / / I include a URL







 includes "http://www.sito.com/esempio.php";



Note that if you include a URL querystring can also add something, however, is not possible to include local files:





 / / Correct







 includes "http://www.sito.com/esempio.php?foo=1";









 / / Wrong







 include ".. / esempio.php? foo = 1";



In the same category ...
E-Learning
Linux (Course) Linux (Course)
Complete guide to open-source system. From 49 €.
MySQL (Course) MySQL (Course)
Management of open-source database. From 39 €.
PHP (Course) PHP (Course)
Full course for creating dynamic Web sites. From 49 €.
Sponsored Links