Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by picokojama

  1. This is good alternative for local testing... Thanks
  2. Hi everyone, Is it possible and how to set up cron job on local server, I am using windows 8.1 with xampp installation. I wasn't sure does the topic need to go on server's forum section, but I don't really understand concept behind cron jobs (I allways set it up in cpanel), so I posted it here. Thanks in advance.
  3. Well, method is good enaught... I just found extra level of security, disablad php from running in directory with .htaccess Thanks
  4. Hi there, I know how to secure file upload by checking file extension, but how can I secure from files that looks like images(have .jpg extension), but they are something else, like .exe file with .jpg extension (don't know for mac and ubundu, but you can do that trick on windows) Thanks advanced
  5. picokojama

    OOP error

    Hi everyone, I have something like more advanced problem, so I hope someone will help. No need for looking for variables and functions matches, I have good editor, and if there is any, it is because I am translating code to english. Here I have class DBobject, which contains all common database methods, but my focus is on two: public static function find_by_sql($sql) { global $pdo; // pdo connection works fine $query = $pdo->query($sql); $object_array = array(); while($row = $query->fetchAll()) { $object_array[] = static::instantiat
  6. picokojama

    PHP timezone

    Or you can change php.ini file once for all
  7. Hi! I have one issue with date translating. Here is my code: <?php $day = date("l"); $daynum = date("j"); $month = date("M"); $year = date("Y"); if($day == "Monday"){ $day = "Ponedjeljak"; }elseif($day == "Tuesday"){ $day = "Utorak"; } /* etc, translating day */ if($month == "January"){ $month = "siječnja"; }elseif($month == "February"){ $month = "veljače"; } /* etc, translating month */ elseif($month == "December"){ $month = "prosinca"; } echo $day . ", " . $daynum . ". " . $month . " " . $year . "."; ?> Now, problem is: Why output is "Utorak, 11. Dec 2012." (there should be "Utorak
  8. I also have one problem with date. Here is my code... <?php $my_t=getdate(date("U")); print("$my_t[weekday], $my_t[month] $my_t[mday], $my_t[year]"); ?> It works, output is, for example "Sunday, December 9, 2012"Now, I want to translate it to my language, which means that I don't want to display "Sunday, December 9, 2012" but "Nedjelja, 9. prosinca, 2012." It is no matter if you don't understand this, I was wondering if anyone can just write how to not display "Sunday" but, for example, "Sunnyday" Thanks
  • Create New...