Thursday, June 17, 2010

How to remove index.php from url in CodeIgniter

How to remove index.php from url in CodeIgniter


just create a .htaccess file in the root and write these listed below entries:
---------------------------------------------------------------------
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
---------------------------------------------------------------------

Wednesday, June 16, 2010

Word wrap in Html

<!DOCTYPE html>
<html>
<head>
<style>
p.test
{
width:11em;
border:4px solid #000000;
word-wrap:break-word;
}
</style>
</head>
<body>

<p class="test">ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
.</p>

</body>
</html>

Folder lock and unlock

Folder lock and unlock












download here 



Wednesday, June 9, 2010

Image Rotate In PHP

Image Rotate In PHP

Here I am showing the code that will contentiously rotating  and Image.


The first file is:

 showImageRotate.php
< html >
< head >
< SCRIPT >
function init()  {
    setInterval("show();", 2000)
}
var dd = 1;
var cc=1;
var iii;
function show()  {
    if(dd>360) {
        dd=1;
    }
    iii=document.getElementById("div1");
    iii. innerHTML = " < img src= "imageRotate.php?degree=%22+dd+%22" / >";
    dd+=10;
}
< / SCRIPT >
< /head >
< body onLoad="init(); ">
< table width="200" border="0" >
  < tr >
    < td >            < /td >
    < td >             < /td >
    < td >< div id="div1" style="height:300px; width:500px">< /div >< /td >
  < /tr >
< /table >
< / body >
< / html >


And here is the second file:
 imageRotate.php

< ? php
// ImageRotate.php
$filename = 'a1.jpg';
$degrees =$_GET['degree'];
header('Content-type: image/jpeg');
$source = imagecreatefromjpeg($filename);
$white=imagecolorexact($source,255,255,255);
imagecolortransparent($source,$white);
$rotate = imagerotate($source, $degrees,$white);
imagejpeg($rotate);
? >