How to Access MySQL Command Line in XAMPP?

MySQL binaries should be under your XAMPP folder. Look for a /bin folder, and you’ll find the mysql.exe client around. Let’s assume it is in e:\xampp\mysql\bin, then you should fireup a command prompt in this folder.

First, go to e:\xampp, and run xampp_start. If you do not run xampp_start first, the error message “Can’t connect to Mysql server on ‘localhost'” will occur when you go to step 2.

Afer you run the commend prompt of DOS, then enter:

cd d:\xampp\mysql\bin
mysql.exe -u root –password

Enter password:
and enter root password

mysql>

After log into your mysql server, and start typing your commands.
Type “quit”  or “exit” to exit mysql
(more…)

Posted in Php Study. Comments Off on How to Access MySQL Command Line in XAMPP? »

WordPress SEO

We should take care the following points on wordpress seo:
1. meta title:
We shoud let wordpress shows different titles for homepage, page, post, categories, very simple, replace the original title related code to

<title><?php wp_title(‘&laquo;’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title>

2. page title
Save as meta title, we can use the following code:
<h1><a href=”http://www.glassesexperts.com/”><?php if ( is_single() || is_page() || is_category() || is_tag() ) { wp_title(”); } else { bloginfo(‘name’); } ?></a></h1> (more…)

Posted in Php Learning, WordPress. Comments Off on WordPress SEO »

Some skills on showing wordpress posts

Sometimes we want to show wordpress posts according to our demanded styles. For example, we like to show 10 posts, and post links resource codes should like this:
<a title=”king php” href=http://www.kingphp.com>king php</a>
We can do as following:
<ul>
 <?php
 $rand_posts = get_posts(‘numberposts=10&orderby=rand’);
 foreach( $rand_posts as $post ) :
 ?>
    <li><a title=”<?php the_title(); ?>” href=”<?php the_permalink(); ?>”> <?php the_title(); ?></a></li>
 <?php endforeach; ?>
</ul>
</div> 
(more…)

Posted in WordPress. Comments Off on Some skills on showing wordpress posts »

How to let 2 domains show the same contents in Hostgator Hosting?

Sometimes we want to 2 domains show the same contents in Hostgator Web Hosting, and show different domain. For example, we want to let www.cheapglasses123.com, and www.bestpriceglasses.org show the same contents, but use differnt domains also. We can do like this when we Addon Domains to Hostgator Cpanel. (more…)

Posted in Php Skills, Web Hosting. Comments Off on How to let 2 domains show the same contents in Hostgator Hosting? »

Some tips on adding ads code to wordpress

If we do not want ads code shows at wordpress homepage, but at the other pages, we can use the following code:
<?php if (($wp_query->current_post == 0)and (!is_home())) : ?>
<div style=”float:right;margin-left:20px”><br>
Buy sunglasses online.
</div>
<?php endif; $postcnt++; ?>

If we want the ads codes show at all pages, we can use the following codes: (more…)

Posted in Php Code, WordPress. Comments Off on Some tips on adding ads code to wordpress »

Use WordPress to Setup Multi Blogs Under One Mysql Database

We can use Mu to setup multi wordpress blogs. If you do not want to do so, you can use wordpress to setup multiy blogs also.

 For example, we want to set up two blogs: www.glassespeople.com ,and http://blog.glassespeople.com, we only add the following code at wp-config.php: (more…)

Posted in Php Code, WordPress. Comments Off on Use WordPress to Setup Multi Blogs Under One Mysql Database »

How to control WordPress 3.0 tag cloud font size?

Go to wp-includes, use dreamweaver to open category-template.php, search the following code:

function wp_tag_cloud( $args = ” ) {
 $defaults = array(
  ‘smallest’ => 8, ‘largest’ => 22, ‘unit’ => ‘pt’, ‘number’ => 45,

then change smallest font size and largest size as you like, say:

 function wp_tag_cloud( $args = ” ) {
 $defaults = array(
  ‘smallest’ => 10, ‘largest’ => 10, ‘unit’ => ‘pt’, ‘number’ => 45,

 Hope the above code is useful to you!

Posted in WordPress. Comments Off on How to control WordPress 3.0 tag cloud font size? »

2 Methods to show wordpress lastest posts at other site

Method one, we can show other wordpress posts at our site by using  simplepie.inc, download a wordpress plugin, named “simplepie-core”, and upload simplepie.inc to your site root, you can rename simplepie.inc to other name also, ie, eyeglassframes.inc.

Then add the following code at your own site .php file. (more…)

Posted in Php Code, Php Skills, WordPress. Comments Off on 2 Methods to show wordpress lastest posts at other site »

Problem with cURL and PHP Output Buffering while installing zen cart

When we install zen cart under XAMPP, we often meet two issues:

ATTENTION: Problems Found CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info… (more…)

Posted in Apache, Zen Cart. Comments Off on Problem with cURL and PHP Output Buffering while installing zen cart »

How to change wordpress post author name?

Sometimes we want to change wordpress posts author name, if you only need to change several posts, and you do not know the skills, you can delete and repost with the new author name. If you need to modify hundreds posts with the same author, how to do then? (more…)

Posted in WordPress. Comments Off on How to change wordpress post author name? »
King Php Science Designed by:KingPhp.com Welcome, you are from: 54.166.203.76