Perl: Appending array in a hash element
My code : push($parentmenu{$parentkey}{childlist},[$childmenu{$childid}{name},$childmenu{$childid}{link}]); Gives me this error. Type of arg 1 to push must be array (not hash element) at ./test.cgi...
View ArticleA href = “#” with javascript event onclick issue on IE
I have this kind of link on my code : < a href = '#' onclick='javascript:window.open("http://somelocation.net/")'>somelocation </a> The problem with this is that whenever this is clicked in...
View ArticleNotes on PHP addslashes,mysql_escape and stripcslashes
This is just a short note while I was coding/studying on PHP a few minutes earlier for my site. From the manual of PHP: addslashes – Returns a string with backslashes before characters that need to be...
View ArticleA notes UTF8 in MySQL and PHP
According to Wikipedia, the Congo Region has 3 countries, the 2 Congo countries and the Angola. I was tasked to list the countries all over the world and that includes the two (2) countries of Congo...
View ArticleVtiger CRM backtracing code
To backtrace the particular part in the vtiger script.. add the following code. $bt = debug_backtrace(); $ut = array(); foreach($bt as $t){ $ut[] =...
View ArticleGoogle Chrome – No space between words in pdf
In my ubuntu Natty, the rendering of my php script in google chrome displays without spaces between words in pdf. But if i view that on other OS like win7 or winxp with google chrome, the script will...
View ArticlePHP simple text file writer and reader code
For file writing <?php $filename = "c:\\temp\\mydata.txt"; $mystring = fopen($filename, "wb"); $handle = fopen($filename, "wb"); $newstring = str_replace("oldword", "newword", $mystring); $numbytes...
View ArticleResolving this JSON on php5 not found on CENTOS 5
The error : PHP Fatal error: Call to undefined function json_encode() appears if your version of PHP is less than 5.2.0. There is a work around on this. They are as follows: Login as root on Linux...
View ArticleHP Compaq PC that uses Intel 82566DM network problem in Linux
The problem of this pc is upon installation of Centos 5.7, the network is up but if you ping the other pc its just saying “Destination unreachable”. The fix for this problem is this: 1) Download the...
View ArticleOpencart SEO url in Nginx sample
Here is my sample URL rewriting definition for opencart SEO links that I hope to be useful on other developers running in NGINX. Notice that I have /opencart/ as the path of my opencart installation....
View Article