Skip to content

Instantly share code, notes, and snippets.

View karim-khan's full-sized avatar

Md. Karim Khan karim-khan

View GitHub Profile
@karim-khan
karim-khan / php_base_url.php
Created October 25, 2016 12:28
It is a base URL any web application base on php
<?php
function base_url($atRoot = FALSE, $atCore = FALSE, $parse = FALSE)
{
if (isset($_SERVER['HTTP_HOST'])) {
$http = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
$hostname = $_SERVER['HTTP_HOST'];
$dir = str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
@karim-khan
karim-khan / currency_symbols.php
Last active October 25, 2016 04:55 — forked from gibbs/currency_symbols.php
An array of currency symbols as HTML entities
<?php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '&#1423;',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',