When you run wordpress under xamm, Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 334230 bytes) in D:\xampp\htdocs\test.php on line814. Â 1. Open \xampp\apache\bin\php.ini .Do not go to the directory of phpt to find php5.ini . 2…. Read moreIncrease the memory-limit in php
trim (PHP 4, PHP 5) trim â€” Strip whitespace (or other characters) from the beginning and end of a string
It is very simple: <?php if ($wp_query->current_post == 0) : ?> <div style=”float:right”> ads come here. </div> <?php endif; ?> If you don’t want the ads show at homepage, using: <?php if (!is_home())Â ?>
Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demonstrate how to generate and send emails in PHP. So, you want to send automated… Read moreSending Email (Text/HTML/Attachments)
Sometimes you need to add an extra protection to password-protected website. This article explains how access to the login page can be restricted after three unsuccessful login attempts. This schema uses visitors IP address to store log attempts in the… Read moreBlocking access to the login page after three unsuccessful login attempts
Sometimes, you might want to get the current page URL that is shown in the browser URL window. For example if you want to let your visitors submit a blog post to Digg you need to get that same exact… Read moreHow to Get the Current Page URL
First build a database table: CREATE TABLE `su_lockip` ( Â `id` int(4) NOT NULL auto_increment, Â `lockip` varchar(1024) default NULL, Â PRIMARY KEYÂ (`id`) )Â Second, design a page so that you can add the ip you want to ban,… Read moreHow to usp php to ban ip
It is very easy to tag cloud show the same size font and in list style, there are 2 ways to do this: 1. Change sidebar.php in templates: <li> <h2>Tag Cloud</h2> <?php wp_tag_cloud(‘smallest=8&largest=8&number=45&orderby=name&format=list’); ?> <!– wp_tag_cloud(‘smallest=8&largest=8&number=45&orderby=name&format=list’)–> </li> another way is… Read moreHow to let tag cloud show the same size font and in list style?
If you want your posts show from lowest to highest, it is very simple, just add: <!–p query_posts($query_string.’&order=ASC’);–> for example, the following code will let all your post show from lowest to highest: <!–p query_posts($query_string.’&order=ASC’);–> <!–p if (have_posts()) : while… Read moreHow to let the post show from lowest to highest?
If you want to list 50 posts, use the following code: <ul> Â <?php Â global $post; Â $myposts = get_posts(‘numberposts=-1’); Â foreach($myposts as $post) : Â ?> Â Â Â <li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li> Â <?php endforeach; ?> Â </ul> if you want to list all… Read moreList 50 posts of wordpress.