How to display HTML tags as plain text in browser using php

Show HTML tags in browser we can use   htmlspecialchars() <?php $new = htmlspecialchars("<a href='test'>Test&l...

Read more

How to install pear mail in ubuntu

pear install Net_SMTP sudo /etc/init.d/sendmail start sudo /etc/init.d/apache2 restart

Read more

Configure SMTP mail on apache server in ubuntu

sudo apt-get install php-pear sudo pear install Mail_Mime sudo apt-get install sendmail sudo /etc/init.d/sendmail start sudo ...

Read more

Hide Div with Javascript

<script> document.getElementById("system-message-container").style.display ="none"; </script>

Read more

Node.js Response.WriteHead function

Up until now all we've been sending into the writeHead function is the status code. However, it can take additional parameters like &...

Read more

Node.js Read File from Server

Now, showing you how to create an HTTP non-blocking server and how to read a file of the non-blocking filesystem. var http = require(&#...

Read more

node.js Convert Blocking

Everyone don't knows why important to write non-blocking programs in Node.js. Here is some code using non-blocking function " read...

Read more

Create User in Mysql

CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON *.* TO 'monty'@'...

Read more

Get http header information in php

getallheaders — Fetch all HTTP request headers array getallheaders ( void ) Example <?php foreach (getallheaders() as $name...

Read more

php check request came from mobile or computer browser

$useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|comp...

Read more

First Node.js application: "Hello World"

Open editor and create a file called helloworld.js. We want to write "Hello World" to Consol console.log("Hello World&q...

Read more

Install Node.js in UNIX

Do something like this tar -zxf node-v0.6.18.tar.gz #Download this from nodejs.org cd node-v0.6.18 ./configure && make &am...

Read more

TATAdocomo google talk is not working

1.Go to Settings>>Data usage>>Check Mobile data should be ON. 2.Now comes back one level then click more (Settings>>more...

Read more

how to programmaticaly restart WAMP or Apache?

You can use this command for restart Wamp, Apache, Mysql services For Start Services NET START wampapache NET START wampmysqld For S...

Read more

Rendering a module inside a component

   $document   = &JFactory::getDocument();    $renderer   = $document->loadRenderer('module');    $params   = array('sty...

Read more

ubuntu remove file from folder

rm -rf `find . -type d -name .svn`

Read more

Ubuntu delete files/folders

If you want to remove file and folder from terminal you can use rm <filename> delete folder rm -rf <foldername>

Read more

ubuntu cp omitting directory

Couple of things here: 1. Don't use "sudo". you don't need it, you already have the permissions to write stuff in your ow...

Read more

How to set the env variable for PHP?

You May use   set   keyword for set the path set path =% path %; c : /wamp/ bin / php / php5 . 3.0 if all the path are set in path var...

Read more

How can I “comment-out” a section in a batch file?

The REM statemen This is the most common way to write comments. Any line in your bat-file that starts with REM is completely ignored by the...

Read more

Cakephp internal server error

If you are stand on Root folder your .htaccess should like <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ ap...

Read more

Printing Batch file results to a text file

For showing result of batch file in text file, you can use this command     chdir > test.txt This command will redirect result to test.t...

Read more

Joomla Plugin Events

These are described in the following topics. Authentication onUserAuthenticate Captcha onInit onDisplay onCheckAnswer Content onContentPr...

Read more