This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db = JFactory::getDBO (); | |
$query = $db->getQuery(true); | |
// .... | |
try { | |
// echo $query->dump(); | |
$db->setQuery($query); | |
$result = $db->loadResult(); | |
}catch (Exception $e){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the list of apache modules which we were able to disable safely. This list is published just to give you idea, so be careful and consider your specific needs before disabling these. | |
Here is the list | |
proxy | |
proxy_ajp | |
proxy_balancer | |
proxy_connect | |
proxy_ftp | |
proxy_http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg class="svg-icon" width="51" height="32" viewBox="0 0 51 32"><path d="M20.806 24.295c-1.767 2.88-.575 5.249 1.874 6.579s5.227 1.116 6.994-1.763 12.92-28.574 11.95-29.102c-.971-.526-19.051 21.406-20.818 24.285zm4.794-18.301c1.119 0 2.213.091 3.279.261 1.122-1.32 2.377-2.776 3.599-4.159-2.182-.594-4.486-.917-6.878-.917-14.355 0-25.6 11.386-25.6 25.921 0 .894.042 1.789.125 2.66.126 1.325 1.383 2.3 2.777 2.185 1.409-.118 2.448-1.288 2.322-2.613-.069-.73-.104-1.48-.104-2.232 0-11.835 8.996-21.105 20.48-21.105zm18.479 3.008c-.714 1.805-1.47 3.646-2.135 5.237 2.603 3.537 4.135 7.979 4.135 12.859 0 .763-.036 1.529-.109 2.276-.128 1.324.91 2.496 2.318 2.617l.235.01c1.309 0 2.425-.94 2.546-2.189.086-.891.13-1.804.13-2.712 0-7.108-2.694-13.458-7.121-18.096z"></path></svg> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Поиск файлов, которые были модифицированы в последние 60 минут в директории /target_directory и во всех ее поддиректориях: | |
$ find /target_directory -type f -mmin -60 | |
Поиск файлов, которые были модифицированы в последние 2 дня в директории /target_directory и во всех ее поддиректориях: | |
$ find /target_directory -type f -mtime -2 | |
Поиск файлов, которые были модифицированы в последние 2 дня в директории /target_directory и ее поддиректориях глубиной до 3 уровня: | |
$ find /target_directory -type f -mtime -2 -depth -3 | |
Вы также можете задать диапазон времени модификации. Поиск файлов, которые были модифицированы в последние 7 дней, но не позднее чем 3 дня назад: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JPATH_ADMINISTRATOR - Путь к каталогу администратора (/administrator) | |
JPATH_BASE - Путь к установленному сайту Joomla | |
JPATH_CACHE - Путь к каталогу, содержащему кэш | |
JPATH_COMPONENT - Путь к компоненту, который в данный момент исполняется | |
JPATH_COMPONENT_ADMINISTRATOR - Путь к административному каталогу того компонента, который в данный момент исполняется | |
JPATH_COMPONENT_SITE - Путь к каталогу сайта того компонента, который в данный момент исполняется | |
JPATH_CONFIGURATION - Путь к каталогу, содержащему файл конфигурации configuration.php | |
JPATH_INSTALLATION - Путь к каталогу установки Joomla | |
JPATH_LIBRARIES - Путь к каталогу, содержащему библиотеки Joomla | |
JPATH_PLUGINS - Путь к каталогу, содержащему плагины Joomla |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://docs.joomla.org/JURI/root | |
// Зависит от переменной конфигурации configuration.php | |
// public $live_site = 'http://домен.ru'; | |
JURI::base (true) - со слэшом | |
JURI::base (false) || JURI::base () - без слэша | |
// https://docs.joomla.org/API17:JURI::current | |
JURI::current() - Возвращает URL-адрес запроса, минус запрос. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$info = new SplFileInfo( $url ); | |
$fileName = $info->getBasename() ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php Header('Content-Type: application/javascript');?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( !( $html = $JСache->get( 'action-footer' , 'mododuls' ) ) ) { | |
jimport('ukcpu.document.document'); | |
jimport('ukcpu.admin.control'); | |
$uDoc = ukcpuDocument::getDocument(); | |
#$module = JModuleHelper::getModules('action-footer'); | |
#$attribs['style'] = 'raw'; | |
#$html = JModuleHelper::renderModule($module[0], $attribs); | |
// if type html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* скачать внешний файл скрипта и сохранить | |
* opt - найти в файле подстроки и заменить | |
* opt - добавить подстроки в конец и/или в начало файла | |
* @ $file_url - Url скачиваемого файла | |
* @ $save_to - локальное хранилище файла ( JPATH_BASE . "/assets/resurs" . '/gtm/'.$ID.'/gtm.js' ) | |
* @ $scripCherch - array // массив поиска в файле | |
* @ $scriptRepl = array // массив замены | |
* @ $addToContent array( | |
* 'srart' => NULL , // - Добавить в начало файла ( строка ) |
OlderNewer