Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. trq

    PLEASE HELP

    Then you need to hash it before your comparison. And in whole words?
  2. file_exists works fine (since 5.0) providing you have url wrappers enabled.
  3. trq

    PLEASE HELP

    Are your passwords hashed? Besides, you should be executing your check within your actual query.
  4. While ob_get_flsuh returns the contents of the buffer, it also flushes (sends it). If you want to retrieve it without it being sent use ob_get_contents.
  5. There is no such thing as a *web path*. Can we see some examples of the paths you are storing? How your using them in your markup? And the absolute path to your images?
  6. I have never heard of it and taking a quick look at the articles you linked to, he is referring to *helper classes*, not some *helper* design pattern. I would say for the most part I agree with his comments though. Creating classes of static *helper* methods opens yourself up to tight coupling between your helper classes and your actual code base. Presenting this same functionality without the static methods could potentially maker this a little better if you use dependency injection to access your *helper* objects within other objects.
  7. If you indented your code so that it was readable someone might actually read it and help you.
  8. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356856.0
  9. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=356880.0
  10. trq

    Same id hover

    Yes I read your post. It makes little sense.
  11. Again: A redirect makes a completely new request to the server.
  12. trq

    Same id hover

    id's must be unique.
  13. A redirect makes a completely new request to the server. What exactly are you expecting to be within the $error variable?
  14. Why do you need to store it? PHP can generate it dynamically and it can be read directly from AS. XML, As far as a method of data transport is outdated by far superior methods IMO. I'm not sure why you think this is the easiest method. If you truly do believe so, why are you here asking questions?
  15. No it's not just you. It bugs the shit out of me that people in the U.S assume the rest of the world revolves around them and there economy.
  16. No. The best solution for production is having someone who understands how to configure a server for production. No out out of the box solution is going to fix that.
  17. Why wouldn't you be able to store it?
  18. No. You don't want slashes stored in your database. The idea is no different to escaping quotes within a quoted string. echo 'This is some text with \'quotes\' in it.'; You don't expect the backslashes to show up when you echo this. The same theory applies to mysql_real_escape_string. You don't want the actual slashes stored in your database.
  19. You should be testing that your methods do what they are meant to do. This class in particular is going to be hard to test because it has hardcoded dependencies on specific files and directories. This is one (amongst many) key benefits to unit testing, you need to write code that is easily testable which actually improves your design. You should remove the hardcode constants from your class and instead make setter methods for these values. This way can can easily test your code by using mock config files. It will also meen that you will be able to use this class more easily in various projects that don't have this same hardcoded directory structure.
  20. Are you expecting the slashes to show up in your database? because they won't and it's not meant to. It simply escapes special chars on the way into the database.
  21. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=356828.0
  22. And why are you using stripslashes all over the place? If your data has slashes in it, something went wrong on the way into the database.
  23. zipping a directory will not effect its structure. I'm not sure what the issue is.
×
×
  • 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.