Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}
Image title text: {{ node.field_name.title }}
Entity Reference path: {{ content.field_tags[0]['#url'] }}
<?php | |
public function ConvertStringToArray($str) { | |
$str = substr($str, 1, strlen(substr($str, 0, strlen($str)-2))); | |
$str = str_replace("'",'',$str); | |
$strs = explode(',', $str); | |
$arr = array(); | |
$c_strs = count($strs); | |
for ($i = 0; $i < $c_strs; $i++) { | |
if (strpos($strs[$i],'=>') !== false) { |
<?php | |
// include All file php in directory API | |
$dirAPI = array_filter(glob(path_dir_root), 'is_dir'); | |
foreach($dirAPI as $dir){ | |
foreach (glob("$dir/*.php") as $filename) | |
{ | |
include $filename; | |
} | |
} |
/*** CREATE table Departments **/ | |
CREATE TABLE Departments( | |
DepartmentID INT IDENTITY(1,1) PRIMARY KEY, | |
DepartmentName varchar(500) | |
); | |
/* Insert record into table Departments */ | |
INSERT INTO Departments (DepartmentName) VALUES | |
('IT'),('HR'),('Payroll'),('Admin'); | |
/** CREATE TABLE Employees **/ |
SELECT column_name, data_type, character_maximum_length, numeric_precision, numeric_scale, is_nullable, column_type, column_default, column_key, extra FROM information_schema.columns WHERE table_name = 'table_name' AND table_schema = 'name_database' ORDER BY ordinal_position |
<?php | |
/* | |
* Function create encrypt MD5 | |
* Remember mcrypt_encrypt() not support PHP 7.0 | |
*/ | |
public function encryptMD5($string) { | |
$qEncoded = base64_encode(mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5('[MÃ_KEY]'), $string, MCRYPT_MODE_CBC, md5( md5(['[MÃ_KEY]']) ) ) ); | |
return $qEncoded; | |
} |
//Call before load modal boostrap | |
element.on('show.bs.modal', function () {}); | |
//Call after load Modal bootstrap | |
element.on('shown.bs.modal', function (e) {}) |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ $scheme://example.com$request_uri?; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |