Jump to content
php.lv forumi

senters

Reģistrētie lietotāji
  • Posts

    372
  • Joined

  • Last visited

Community Answers

  1. senters's post in Kļūda par UUID_SHORT was marked as the answer   
    uzmetu šādi:
    function generateUniqueKeyShortWithPhp() {         //set the random id length         $random_id_length = 10;         //generate a random id encrypt it and store it in $rnd_id         $rnd_id = crypt(uniqid(rand(),1));         //to remove any slashes that might have come         $rnd_id = strip_tags(stripslashes($rnd_id));         //Removing any . or / and reversing the string         $rnd_id = str_replace(".","",$rnd_id);         $rnd_id = strrev(str_replace("/","",$rnd_id));         //finally I take the first 10 characters from the $rnd_id         $rnd_id = substr($rnd_id,0,$random_id_length);         return $rnd_id;     }  
  2. senters's post in Hostings Godaddy un problēmas ar non-www adresi was marked as the answer   
    Šo izdevās atrisināt atstājot tikai vienu A ierakstu, ar veco IP. Tas gan neko nemainīja un bez www nedarbojās.
     
    risinājums bija .htaccess pievienot:
     
     
    RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
×
×
  • Create New...