Jump to content

divinequran

Members
  • Posts

    71
  • Joined

  • Last visited

Posts posted by divinequran

  1. Thanks for reply,

     

    Yes they are tamil characters, The characters are encoded and the value is posted. The DB was not constructed earlier to accept it as itself of the characters. The browser itself decodes the value.

     

    html_entity_decode(); dosent work. Any other workaround to achieve this with generally available functions.

  2. Hello,
     
    I want to write some unicode "இயற்கை" values into a file in its real format like "இயற"
     
    Actually the browser prints the charactes in correct format, but I want it to be same in view source or browser source(இயற) but now the he browser displays it as (இயற்கை)
     
    $text = "இயற்கை";
    $rest = utf8_decode($text);
    echo "$rest";
     
    How to achieve this?
    Decode

     

    இயற்கை
  3. Dears,

     

    Consider I have a folder called docs

    mysite.com/docs/

     

    I want to redirect some of the request to

    mysite.com/docs/word/index.php ==> here word folder doesnot exist(which is $1)

    mysite.com/docs/ppt/index.php ==> here ppt folder doesnot exist(which is $1)

     

     

    RewriteRule ^(.*)/index.php$ /docs/$1/all-ind.php?=$1

     

    How this can be achieved? Please help..

  4. Hello,

     

    The below code works on my home machine.. but not on my Linux machine, I am unable to figure out the problem, please help

     

    require_once("dbconnection.php");
    
    function coun_list()
    {
    $rs=mysql_query("select name from timezones") or die(mysql_error());
    while($row=mysql_fetch_row($rs))
      {
       $tzone=$row[0];
       if($tzone=='Asia/Calcutta') $tzone='Asia/Kolkata';
       try {
           $tz = new DateTimeZone("$tzone");
           $lt=$tz->getLocation();
           $lat=$lt['latitude'];
           $lon=$lt['longitude'];
           echo "$tzone";		
           }
          catch (Exception $e) {
            echo 'Caught exception: ',  $e->getMessage(), "\n";
           }
      }
    }
    
    coun_list();
    

     

     

    I get the below error on my Linux machine,

    Caught exception: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone ()

     

    Please help me to figure out the issue..

     

  5.  

    I have a big student database, it has only one table. I want to select 10 student each department on a single mysql query.

     

    +---------------------------------------------------------+----------------------+

    | student | Dept |

    +---------------------------------------------------------+----------------------+

    | gooch | physics |

    | aaaaa | mathss |

    | dvssdg | maths |

    | sfgsfg | chemistry |

    | gcbcvb | chemistry |

    | dgsgsfg | arch |

     

    I have a big list like this.. I have to select ten student from each department. how shall I achieve it?

     

    Also I want to select student in random each time.

  6. Hi,

     

    I want all the pages from w3calculator.com/info/....(*) have to be redirected to the sub domain http://info.w3calculator.com

     

    I have tried with the following redirection code it doesnot work. please help..

     

    RewriteCond %{HTTP_HOST} ^w3calculator.com/info/[a-z]$
    RewriteRule ^w3calculator.com/info/[a-z]$ http://info.w3calculator.com/ [R]

     

    RewriteCond %{HTTP_HOST} ^w3calculator.com/info/(.*)$
    RewriteRule ^w3calculator.com/info/(.*)$ http://info.w3calculator.com/ [R]

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.