Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Dunno how you regard my skill level, but I truly do think that it's too easy.
  2. It's probably more likely a difference between PHP 5.1 and 5.2.
  3. Uh... perhaps in "PHP Help", which is like 5 cm below this forum unless you have a gigantic monitor. How difficult is it to just look over all the boards? It'll take two minutes tops.
  4. The license is only really for distributors. The license is meant to promote open source and therefore it forces people to release the source code along the binaries. If you violate the license then it's strictly speaking a contractual breach in which case you might find yourself in court.
  5. Alice will have to release the modified source code on demand to comply with the license.
  6. You have to pay a couple of bucks for it in the Zend Store.
  7. I once thought about getting a ZCE, but after took the mock test I decided I wouldn't bother. It was too easy IMO, and the mock test is supposed to be more difficult than the real test. I managed to score excellent (out of fail/pass/excellent) on all but one of the areas. After having taken that mock exam I haven't really regarded the ZCE as anything special. It's mostly just some stupid questions checking if you know what a particular function does (which you could look up), if you can do some stupid and obscure hex calculation in your head (which you could do on your calculator) and whether you can figure out which line to insert at a particular point in some fairly large script to get it to do X.
  8. An octet means a group of 8 (from Greek okta-). An eight-digit unsigned binary number has the range [0,111111112]=[0,25510], so assuming that each 255 in your string is in base 2 and then converted to base 10, each group is one octet, i.e. one byte. I'm not sure what a "sensible format" would constitute. Your string is just a space delimited numbers.
  9. Here is your help: Become proficient in both languages and do it manually. That's the only way I'm afraid, and you were already told that.
  10. And for the more bold people: http://justfuckinggoogleit.com/
  11. http://www.youtube.com/watch?v=jhTxRssxfuI
  12. Heh... it's kind of hypocritical that I would find this on your forum:
  13. Pfft... well I'm not going to force you to stay here (not that I could do it if I wanted to anyway), but I think you'd be hard pressed to find many forum where nobody makes any jokes whatsoever.
  14. We are, but that doesn't mean we cannot make jokes about things Well, I am at least
  15. glob returns the filenames of all files that match, so yes, it should return the extension as well.
  16. Daniel0

    explode

    Looks like you have other problems on your website as well (see attached screenshot). I suppose you're getting the text from a database and using a wrong collation. You need to use the same character set throughout your entire application, that's to say you need to save your files in that charset, you need to tell the client which charset it is and your database has to be in that charset. Anyway, that's not relevant to your problem in this topic. Just thought I'd point it out. [attachment deleted by admin]
  17. Why are you redefining all the variables? Considering variables are passed by value this essentially results in double memory consumption, which is a waste because you aren't doing anything new with them. Anyway, you're never running the query, so change $sql = "SELECT * FROM consultant WHERE email_address = '$email_address'"; if (mysql_num_rows == 0) to $sql = mysql_query("SELECT * FROM consultant WHERE email_address = '$email_address'"); if (mysql_num_rows($sql) == 0) You also need to escape your values or you're vulnerable to SQL injection. See: mysql_real_escape_string
  18. if ($results = glob($path . $name . '.*')) { $filename = $results[0]; } else { // doesn't exist... } This assumes that there will be no duplicates such that e.g. test.jpg and test.png exist though. Your code has the same limitation, however.
  19. Something like this would probably be better: $requiredFields = array('field1', 'field2', 'field3' /* etc. */); $missingFields = array(); foreach ($requiredFields as $field) { if (!isset($_POST[$field]) || empty($_POST[$field])) { $missingFields[] = $field; } } if (count($missingFields)) { echo 'Please fill out the remaining fields: ' . join($missingFields, ', '); // show form } else { // process form } That'll be more user friendly seeing as you give feedback about which fields they are missing. This will be especially helpful considering that the form is "huge". It would also allow you to have optional fields should you decide that at a later point.
  20. You make a many-to-many relationship by having an intermediate linking table, C, that stores the relationship between rows in A and rows in B such that each row in C stores the PK of a row x∈A and the PK of a row y∈B such that x and y are related.
  21. Oh, I didn't bother checking. I assumed it was a syntax error considering he had trouble parsing it.
  22. An XML parser is required to halt if there is syntactical errors in the document...
  23. if ($total <= 0) { If $total is less than or equal 0. http://dk.php.net/manual/en/language.operators.comparison.php
  24. I'm afraid I'm of a contrasting opinion. I'd rather switch away from SMF. Migrating a large forum is no simple task though. From an administrator's and a programmer's perspective I find it really bad.
  25. Reminds me that there is this thing called "Google unsafe search". Essentially it's the complement of the results returned by a regular non-moderated search and the results of the same query with a moderated search. This returns all the hits Google regards as "unsafe". There is an image version too.
×
×
  • 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.