Posts

2021 Top 4 Best Upcoming Flagship Smartphones : which are the best mobile phones for you..?

Image
  Hi here are the top 8 best upcoming flagship smartphones of 2021 with high-end level features improved cameras stunning design and many other next-generation technologies will be applied that you will really enjoy also the price and the release date of the smartphones are discussed. Number four Asus Zenfone 8 Number three OnePlus 9 Number two Huawei P50 Number one Apple iPad Pro 12.9

How to get your site approved for AdSense?

Image
Hey today we'll be taking you through the best practices to help you get your site approved.   We will be giving you three recommendations to increase the chances of getting your site's approval status to ready.   Before diving into the best practices, let me introduce them to you.   The first best practice is to make sure your site has the correct ad code. Next, Google AdSense have our second practice, on having the site available. Last but not least, Google AdSense will talk about our program policies to ensure the site is policy-compliant.   So let's get started. The first best practice is to make sure your code is complete and correct. After you've generated the ad code, you will need to place the add code into the HTML of your site. You need to place the ad code in the head tag or at the top of the body of your page, without making any changes. Please make sure you've placed the code into the same site you've added in your AdSense acco

Codeigniter subdomains sharing one common app

Image
I assume that your are using Windows-7 WAMP Apache 2.4.2 (installed in C: directory) PHP 5.4.3 CodeIgniter 2.x   Download Hi there, the first question raises I our mind is  How to add a sub-domain to be reached at: subdomain.mainsite? So, here we start to create sub-domain for localhost. Step 1: Edit the file located in C:\windows\system32\drivers\etc\hosts add the following to it 127.0.0.1 subdomain.mainsite Save File Step 2 : Edit the httpd.conf file Add the following to the bottom of the file ########################## NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "C:\wamp\www" ServerName localhost </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "C:\wamp\www\mainsite" ServerName subdomain. mainsite ErrorLog logs/subdomain_error.log </VirtualHost> ########################### Step 3: You must make sure the subdomain directory exists inside mainsite(CodeIgniter).

Import UTF-8 languages from Excel to Database using PHP

Step 1 Reading different languages from excel and dump into database require you to make sure following: 1. Database Charset : UTF-8 2. Table Charset : UTF-8 3. Table Columns Charset : UTF-8 ( columns to store foreign language characters must be set to UTF-8) Step 2 Now we need to read Excel and import it into database, there are many libraries can be use to read excel file using php, I used PHPExcel Now, what we need is to setup database connection $cn = mysql_connect('localhost', 'db_user, 'db_password'); $db = mysql_select_db('TableName'); Now before use mysql_query we need to set following mysql_query("SET NAMES utf8"); mysql_query("SET CHARACTER SET utf8"); Now, use mysql_query to INSERT records into database for UTF-8 characters Sample PHP Code using PHPExcel /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); if (PHP_SAPI == &#

How to make back button with php

Just paste this code if (isset($HTTP_REFERER)) { echo "<a href='$HTTP_REFERER'>BACK</a>"; } else { echo "<a href='javascript:history.back()'>BACK</a>"; }

Joomla - How could we restrict each member to edit, change status of their own article. And also restrict members not to create category?

http://forum.joomla.org/viewtopic.php?f=673&t=749306&p=2889465#p2889465 The ACL rules you are looking for are more refined than what 2.5 offers out-of the box: You have to set "Edit State" to "allow" to grant permission to publish/unpublish, but this permission does not distinguish based upon author. You have to set "Create" to "allow" to grant permission to create articles, but the permission to create includes new subcategories as well. ACL is enforced at the code level, so if one needs additional permissions or finer control of permissions, then this logic needs to be added at the code level. (I don't think you are going to find a solution to your needs through some configuration of permission settings.) The logic you need can be created with just a few lines of code and inserted into select view files - files that can be overridden so the changes are safe from upgrades. Here is an approach tha

MySQL: deleting tables with prefix

You cannot do it with just a single MySQL command, however you can use MySQL to construct the statement for you: In the MySQL shell or through PHPMyAdmin, use the following query SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' )     AS statement FROM information_schema.tables     WHERE table_name LIKE 'myprefix_%'; This will generate a DROP statement which you can than copy and execute to drop the tables. EDIT: A disclaimer here - the statement generated above will drop all tables in all databases with that prefix. If you want to limit it to a specific database, modify the query to look like this and replace database_name with your own database_name: SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' )     AS statement FROM information_schema.tables     WHERE table_schema = 'database_name' AND table_name LIKE 'myprefix_%';   Thanks to Andre Miller