Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. I.e. the mysql_fetch_*() functions will return false when there are no more rows left which will make the while loop stop.
  2. Yes, except it should be $stmt = $dbh->prepare("SELECT `name` FROM `users` WHERE `id` = ? LIMIT 1"); (without the single quotes around the question mark) as PDO will handle that for you. Otherwise you might end up with two single quotes.
  3. I thought Ron did as well...
  4. Also, if you do a Google search for define:<word here> then you'll get definitions for it from a lot of different web sites. I.e. http://www.google.com/search?q=define:indemnity
  5. Well, DataStorage is not a class, it's an interface. By implementing an interface in a class you'll make sure that the class has the methods required by the interface. On run time you can check it using the instanceof operator.
  6. In the example Dave posted in the first post the use of those two magic methods is unnecessary but there are certainly uses for those methods in some cases (although it would mostly be for convenience).
  7. You could use Zend_Search_Lucene which is a PHP implementation of Lucene. It's part of the Zend Framework but I believe you should be able to use it independently of the framework. http://en.wikipedia.org/wiki/Lucene http://framework.zend.com/manual/en/zend.search.lucene.html
  8. Then they'll implement the same functionality. You can implement multiple interfaces as well if you wish.
  9. Daniel0

    array

    They're working on installing the modification again after the recent upgrade to SMF 1.1.4.
  10. Daniel0

    array

    Yes, remove the isset(), it's redundant when you're also checking that it isn't empty.
  11. It's a file in plain text which you can just open and put content in just like any other file. E.g. <?php $contents = <<<EOF Alias /hello /home/daniel/a_folder/hello2 EOF; file_put_contents('/var/www/.htaccess', $contents); ?>
  12. Daniel0

    array

    You can check if a variable is an array using is_array() or you can force it to be a string using typecasting (e.g. $var = (string) $other_var;). For the marquee, just use htmlentities().
  13. Just use exec() and the other functions like it (check their manual pages for the differences). E.g. exec('shp2text --gpx bike-cape_islands-geo.shp 6 0 > output.gpx');
  14. It's just a plain text file. Nothing fancy about it.
  15. Daniel0

    Font Types

    Times New Roman is serif and Arial is sans-serif. Is that what you mean?
  16. Indeed, but he can see the source then he can see which files are included
  17. If you're not using Vista: http://tredosoft.com/Multiple_IE
  18. Doesn't the syntax highlighting reveal it for you? Remove the last ." from the third last line.
  19. Check out the polls forum I'm sure you'll find something you can reply to there. The reason why this restriction is set is to keep PM spamming to a minimum. It used to be a problem and as far as I know it has helped.
  20. If you make 4 more posts (so you'll have 10) then you'll be able to send PMs.
  21. Escaping the data for database use will not protect you from users posting HTML. Personally I'd use htmlentities() before outputting it, but still store it with the HTML in the database.
  22. I don't get it. Do you seek a solution where you could have multiple identical start/end times?
  23. Just echo them after each other and take use of the page-break-after CSS attribute on each reports container to get one report per page.
  24. Well, post your code...
  25. No, cause you'll have to make it fit your environment.
×
×
  • 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.