Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Actually... b (lowercase) means bits, and B (uppercase) means byte and there are 8 bits to 1 byte: 50 Mb = 419,430,400 b 50 MB = 52,428,800 B 50 Mb = 6,553,600 B (Providing you're not following the regular SI-prefix values for M(ega), but use the prefixes as meaning 1024^n) Also, capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse".
  2. It is in fact hidden for everybody except you and moderators/administrators. Check your profile, your email should be displayed in italics to you which signifies that it's hidden.
  3. No, users cannot access anything per se, but if they have a matching session ID then PHP will use the information stored for that user on disk. Yes. That would be no problem.
  4. I haven't looked very much into it, but based on the little amount of time I've spent with it, it seems really good framework. That depends on what you're looking at. Although "everything is an object" and such, there is no support for interfaces or abstract classes for instance. That question doesn't make sense. What can a car do that a banana cannot? first of all do you mean ruby does not support abstract classes and interfaces? Yes. A better example would be: arr = ['my list', 'of', 'items'] arr.each { |item| print item } or arr.each do |item| print item end In this instance print arr.join would be better though.
  5. Welcome Taylor. I hope you'll learn something by visiting this website.
  6. mysql_query() returns a resource. You'll need to use one of the mysql_fetch_*() functions to actually get the results of the query. Also (and this is not related to the problem), in the $lol12 < '10' part you should use an integer and not a string. It would work in the same way seeing as PHP converts it for you, but it's more correct to just use an integer.
  7. Well, try to echo some information just before the foreach and inside the foreach - perhaps a couple of other places as well. In that way you can see when the execution stops and then you'll know where to look for the problem. I have a couple of suggestions for your code though: Inside the foreach you're using regular expressions to match a string, it would be much more efficient to just the comparison operators or a switch though. Also, preg_replace() is faster than eregi() and ereg().
  8. I believe wampserver allows you to install multiple version and allows you to switch between them.
  9. How doesn't it work? Does it give unexpected results/output or does the foreach never execute?
  10. Well I for one don't know any of that. Would anyone like to recommend a book/tutorial? The thing about the O is called Big O notation and is a way of measuring efficiency. E.g. if an algorithm is running at O(n^2) it means that the system resources used or the running time will increase quadratically as you add more data to be processed by the algorithm. Any book about algorithms would probably cover that. I believe "Introduction to Algorithms" is a pretty common one. Otherwise just google it. Donald Knuth is a famous computer scientist. Again, just google him.
  11. It's easier to help you here because there are more people working on it and the people helping have time to look up references seeing as it's not in real-time. It's also easier to post large amounts of code here. Often you'll experience faster response times on the forums, but that requires you to actually give us something which we can help you with (problem description, error messages, source code, etc.).
  12. You could change if ($field != "fax") { if ($value == "") { $blanks[] = $field; } } to if ($field != "fax") { if ($value == "") { $blanks[] = $labels[$field]; } }
  13. Providing the image exists and $lifebar is set then it should work. How didn't it work?
  14. Perhaps, why don't you post what your problem is and the code regarding that. Then it's likely someone is able to help you with your issue.
  15. What do you mean with grabbing them? The contents of $_SESSION is stored on the server, so anyone having read access to those files can "grab" them. $_REQUEST is just GET, POST and cookie data combined.
  16. Well you could put it in your index.php. I usually use Zend Framework, so I just do require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); That will register Zend_Loader::autoload() with spl_autoload_register(). Zend_Loader::autoload() calls Zend_Loader::loadClass() when a class is attempted to be autoloaded.
  17. Well, I find it immensely annoying when people don't upgrade. They're preventing progression. How long time did it take after the release of PHP5 before you could actually use it? All because of people who are not upgrading. Same goes for Internet Explorer. It's still necessary to support IE6 even though IE7 has been out for a long time - all because of people who are too lazy to upgrade.
  18. It doesn't matter whether they read it or not. The important thing is that they state they agree.
  19. It would be an integer.
  20. If you serve the image dynamically (e.g. by fetching info about it from a database using a primary key), then just have a column called something like downloads and increment it at each download: UPDATE images SET downloads=downloads+1 WHERE image_id=54; For getting the most popular images based on download count just do something like this: SELECT * FROM images LIMIT 10 ORDER BY downloads DESC;
  21. Upgrade.
  22. The way I do is like this: - Add my library folder to the include path - Have an autoloader sort of like this: function __autoload($className) { require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; } So e.g. a class like PHPFreaks_Auth_Adapter_SMF would be in library/PHPFreaks/Auth/Adapter/SMF.php. I find that to work really well.
  23. I haven't looked very much into it, but based on the little amount of time I've spent with it, it seems really good framework. That depends on what you're looking at. Although "everything is an object" and such, there is no support for interfaces or abstract classes for instance. That question doesn't make sense. What can a car do that a banana cannot?
  24. Uhm... there is no difference except for the language used. <ul> <?php foreach ($users as $user): ?> <li><a href="/profile/<?php echo $user->username ?>"><?php echo $user->username ?></a></li> <?php endforeach ?> </ul> <ul> {foreach from=$users item=user} <li><a href="/profile/{user->username}">{user->username}</a></li> {/foreach} </ul> Both of them could be template files thus the code which deals with the template files is a template engine.
  25. I don't mind template engines as long as they use PHP. I find it a bit stupid "inventing" a new language for the sole purpose of that template engine. Even if your code is something like this: function getTemplate($name) { include 'templates/' . $name . '.php'; } then it's still a template engine because of what the code do.
×
×
  • 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.