Portfolio
181988.xyz

WinNMP – Config

February 27, 2018Category : Code/Web IT & Network

How to send emails using PHP WinNMP has 2 options for processing emails sent by PHP’s mail() function: mSmtp and mailToDisk (default). To change the option, edit confphp.ini and modify sendmail_path: For Development use mailToDisk (the default): sendmail_path = ‘”C:/WinNMP/bin/php” -n -f “C:/WinNMP/include/tools/mailtodisk.php”‘ Emails will be saved to logmail-XX.txt For Production use mSmtp: sendmail_path = ‘”C:/WinNMP/bin/msmtp/msmtp.exe” -C “C:/WinNMP/conf/msmtp.ini” -t’ You also need to edit confmsmtp.ini in order to configure SMTP server options   How..

Read more
01.

Mở Remote Desktop windows

December 26, 2016Category : IT & Network

1/ Cấp phép Mở dịch vụ REMOTE DESKTOP Mở System Properties thông qua Control Panel. Nếu không, hãy mở cửa sổ RUN, gõ SystemPropertiesRemote và nhấn Enter để mở các tab Remote của System Properties. Dưới Remote Desktop, sẽ thấy một số tùy chọn, anh em đánh dấu vào như hình bên dưới Sau đó..

Read more
02.

Magento import produdct – fix product not show

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ error_reporting(E_ALL | E_STRICT); define(‘MAGENTO_ROOT’, getcwd()); $mageFilename = MAGENTO_ROOT . ‘/app/Mage.php’; require_once $mageFilename; Mage::app(); $ids = Mage::getModel(‘catalog/product’)->getCollection()->getAllIds(); Mage::getSingleton(‘catalog/product_action’)->updateAttributes( $ids, array(‘status’=>1, ‘visibility’=>4), 0 );  

Read more
03.

Magento remove duplicate img

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ include(‘app/Mage.php’); //Mage::App(‘default’); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); error_reporting(E_ALL | E_STRICT); Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); ob_implicit_flush (1); $mediaApi = Mage::getModel(“catalog/product_attribute_media_api”); $_products = Mage::getModel(‘catalog/product’)->getCollection(); $i =0; $total = count($_products); $count = 0; foreach($_products as $_prod) { $_product = Mage::getModel(‘catalog/product’)->load($_prod->getId()); $_md5_values = array(); //protected base image $base_image..

Read more
04.

Magento SQL update price and special price form csv

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ $mageFilename = ‘app/Mage.php’; require_once $mageFilename; Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); umask(0); Mage::app(‘admin’); Mage::register(‘isSecureArea’, 1); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); set_time_limit(0); ini_set(‘memory_limit’,’1024M’); /***************** UTILITY FUNCTIONS ********************/ function _getConnection($type = ‘core_read’){ return Mage::getSingleton(‘core/resource’)->getConnection($type); } function _getTableName($tableName){ return Mage::getSingleton(‘core/resource’)->getTableName($tableName); } function _getAttributeId($attribute_code = ‘price’){ $connection = _getConnection(‘core_read’); $sql..

Read more
05.

PHP Auto create XML playlist file

December 5, 2015Category : Code/Web

List file create order by abc <?php // *** requires PHP5 *** // search for jpg files $filter = “.mp3”; // path to the directory you want to scan $directory = ‘./audio’; $it = new RecursiveDirectoryIterator(“$directory”); foreach( new RecursiveIteratorIterator($it) as $file) { if (!((strpos(strtolower($file), $filter)) === false)) { $items[] = preg_replace(“#\\\#”, “/”, $file); } }..

Read more
06.

Google Sitelinks Search Box

September 30, 2014Category : Code/Web

Mới đây Google chính thức đưa thuật toán hiển thị Google Search Box Sitelink ngay bên dưới sitelink của website đang đứng top 1 với một từ khóa nào đó tại kết quả tìm kiếm Google.

Read more
07.
© Oliver / All rights reserved.
To top