PHP Template Function: full_url
Posted by Mark [Elevated X Support], Last modified by kayako kayako on 02 November 2018 10:49 AM


This will convert the path to a file to a full qualified URL. If the path passed along is already a full qualified URL, this function will return its output.

Common Location:



<?= full_url("/path/to/file.html"); ?>

<?= full_url(""); ?>


1) The path to the file / location.


If this code is being run on, the output of this function will be:

If this code is being run on, the output listed above will be:

This is because if there no absolute URL specified, full_url() will substitute the existing HTTP_HOST name in its place.


(0 vote(s))
Not helpful

Comments (0)