Posted
on May 17, 2018, 8:36 am,
by admin,
under
bash,
linux.
Posted
on May 16, 2018, 11:47 am,
by admin,
under
redis.
Posted
on April 30, 2018, 12:35 pm,
by admin,
under
joomla,
php.
<?php
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../../..' ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('administrator');
$mainframe->initialise();
$app =& JFactory::getApplication();
$user =& JFactory::getUser();
if($app->isAdmin() && !$user->id) {
header('Location: /administrator');
exit();
}
?> |
dig mydomain.com @ns.myserver.com |
Posted
on April 19, 2018, 11:27 am,
by admin,
under
wordpress.
function my_function() {
global $wpdb;
$wpdb->update('wp_my_appointments', array(
'title' => 'Msc',
'msg' => 'Message'
),array(id => 3));
} |
Posted
on April 19, 2018, 11:25 am,
by admin,
under
wordpress.
function my_function() {
global $wpdb;
$wpdb->insert('wp_my_appointments', array(
'title' => 'Mr',
'msg' => 'Message'
),array(
'%s',
'%s'));
} |
Posted
on April 19, 2018, 11:24 am,
by admin,
under
wordpress.
function my_function() {
global $wpdb;
$appointments = $wpdb->get_results("SELECT * FROM wp_my_appointments;");
echo '<pre>';
print_r($appointments);
} |
Posted
on April 19, 2018, 11:22 am,
by admin,
under
wordpress.
$to = 'your@emailaddress.com';
$subject = 'The subject';
$body = 'The email body content';
$headers = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $to, $subject, $body, $headers ); |
Posted
on March 23, 2018, 10:54 am,
by admin,
under
linux.
user@laptop:/var/www# dpkg -S /usr/bin/firefox
diversion by firefox-mozilla-build from: /usr/bin/firefox
diversion by firefox-mozilla-build to: /usr/bin/firefox.ubuntu
firefox-mozilla-build: /usr/bin/firefox
user@laptop:/var/www# apt-get remove firefox-mozilla-build |
Posted
on February 28, 2018, 12:49 pm,
by admin,
under
mysql.
DELETE
FROM main_table USING main_table,
main_table e1
WHERE main_table.id > e1.id
AND main_table.entity_id = e1.entity_id; |