Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. What do you want to say that does not matter which is gonna be your first language and php is a good language to start learning the programming?
  2. your project b/s it's a MVC Not have a time to do that.
  3. Hm....not able to help you on this without a real data, maybe someone else ....sorry for that.
  4. No, that tells me that you don't have a problem with sessions. Let me see your .htaccess file.
  5. What happens further in that __construct (), when the user is on a session?
  6. So, if the user is on a session that part of the code has never been executed,right? if (!isset($_SESSION['user_data']) || $_SESSION['user_data']['loggedIn'] === false) { if (isset($_COOKIE['rm_session'])) { $cookieInfo = explode("-", $_COOKIE['rm_session']); if ($this->checkCookie($cookieInfo[0], $cookieInfo[1])) { $this->updateCookie($cookieInfo[0]); $this->loginId($this->getId($cookieInfo[0])); return; } }
  7. Alright then, step by step: Go back to the __constructor method did you start a session_start() function on the page before to call that method? Because if not, the logic of your code every time will be the same.
  8. Yep, and we can use IE which is a perffect browser watching porno
  9. Can you save a session without cookies?
  10. When I was reading the post at night something similar jump on the top of my head. I made the test with two different directories and 4 images (jpg and jpeg). Just replace my paths to the folders with your. Here is it: <?php $src = "find images/ gallery/ | grep --basic-regexp '\.[jpeg]' > images.txt"; $exc = shell_exec($src); $lines = array_map("trim", file('images.txt')); $output = array(); foreach ($lines as $line) { $output[] = '<img src=' . $line . ' alt=someImage />'; } ?> <!DOCTYPE html> <html> <head> <script> function displayImages() { document.getElementById("images").innerHTML = "<?php echo $output[0].$output[1].$output[2].$output[4]; ?>"; } </script> </head> <body> <div id="images"></div> <button onclick="displayImages()">Display me</button> </body> </html> Instead of $output[0], $output[1], so on.... loop the indexes with foreach.
  11. I think, It's pretty simple. Find all directories, sub-directories, grep all jpg files and save them paths inside txt file for instance, trim the file names, loop and put all values inside an array, then just display all of them. That's all
  12. By the way, php is not good language for starting with programming and especially for people coming from the Micro$oft's world. There are lots of builded functions, also tons of video/audio tutorials on the web making their life "easier" but actualy that's fake. I see members here using php for more than 3-4 years with a full lack of basic knowledge in php. Why? Because, most of them preffer watching youtube tutorials instead to start reading the API documentation for instance.
  13. There is no problem to use this keyboard, of course I could rub out the symbol if it starts to bother me too much. I just wonder if anybody is seen that kind of keyboard somewhere in the stores?
  14. Most of the time I'm using my machine connecting to different linux servers teminals with old kernels versions. So, I tried once to map those buttons to my VIM but without any success. Did you see somewhere a keyboard without windows buttons in USA?
  15. Yep, but those two buttons are useless in linux
  16. Hey guys, does anybody know a shop in Nort America where I could buy it? I got one many years ago from Norway I think, manufactured by IBM but it's old and broken. I went through many computer's stores in Canada but without any success. Apple's keyboard is not an option b/s I hate them also.... jazz....
  17. Is there something common among all duplicates something unique?
  18. If you want to remove every lines containg the word "Unknown" itself, the easiest way is to create a RegEx which pattern should match every line containing that word. Open up and read the .csv file and use preg_replace replacing all matched lines with null result. Your RegEx pattern should look something like: (according that link -http://thesis.mesmerize.dk/input.csv ) ^".*;Unknown"$ EDIT: If you are using some IDE like NetBeans, you can open the csv file, go to the replace tab and enter my regex string replacing all of them with null result.
  19. Does that happen only with strings containing spacial chars like "København" or not?
  20. jazzman1

    ajax

    You need to check if that username does not exist in the db before to call try{}catch{} blocks not after. Or more professional, create a custom function, put your logic in that function and call it inside try{} block.
  21. With this database design (we were talking about before) I think, it's the best you can do.
  22. First of all, I wanna tell you last time using CI was 3 years ago, I think. If the problem is inside CI conf I cannot help you on this, but for sure your mod_rewrite rule is wrong. Try, Options -MultiViews RewriteEngine On RewriteBase /ci_intro RewriteRule ^(system|application[/]?)$ /index\.php [R=301,L] So, now if you try to reach the /ci_intro/system or the /ci_intro/application directory the request should be redirect to /index.php.
  23. Yes, Jessi. The first time when I run Silex was about a month I think, so the default routing did work at all and I've created my own Apache rewrite rule.
  24. Not only the paths and the base web structure, this is a default routing provided by Silex and it's also related to Apache conf (if apache is your web server) So....the best way is to start reading the documentaion of this library.
×
×
  • 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.