<?php $content = file_get_contents(‘filename.html’); //Example file_get_contents(‘filename.hml’); // Here $key is the search word //Example $key = “php”; if(preg_match(“/”.$key.”/”, $content, $matches)) { echo “found”; } else … Search keywords from static filesRead more
Month: April 2011
List of some Open source CMS in php
CMS – Content Management System Joomla Drupal WordPress Magento Oscommerce Zencart phpbb(forum) Concrete Pligg Sugarcrm(crm) Edirectory
Internal server error in php due to htaccess is not enabled
There are different reasons for this Error. One of the most common reason is using Htaccess. This error is most common while using htaccess. If … Internal server error in php due to htaccess is not enabledRead more
Component generator in joomla cms
These websites will provide the basic component structure. https://www.component-creator.com/en/ https://www.joomlacomponentbuilder.com/ https://www.componentgenerator.com/
How to create constant for wordpress themes folder
Open wp-config.php in root folder, try to add the below constant to this file. <?php define(‘THEME_PATH’, ABSPATH.”/wp-content/themes”);
Turn off errors in PHP
In php file: <?php ini_set(‘display_errors’, false); ?> In Htaccess file: php_flag display_errors 0
get url of wordpress site
<?php echo get_option(‘siteurl’); ?> It prints the site url from wp_options table
Concat fields in mysql
By using CONCAT function in mysql, we can concat fields or string. SELECT CONCAT(‘field1’, ‘-‘, ‘field2’, ‘-‘, ‘field3’); // Output: // ‘field1-field2-field3’