PHP code example of teedmaker / tmphp-server-info
1. Go to this page and download the library: Download teedmaker/tmphp-server-info library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teedmaker / tmphp-server-info example snippets
$base = BASE;
...
echo "<a href=\"{$base}/new-url/test\">go to another page</a>";
$url = ACTUAL;
echo "<span>Real URL is: {$url}</a>";
class AnotherClass
{
/**
* This will return this url containing the base url
*/
public function getUrl(string $url) {
return BASE . $url;
}
}