Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. I would remove all of your code and use password_hash as it was intended.
  2. Older than 5.4? Really? 5.3 has reached end of life. People need to get better hosting if that's the case.
  3. Short echo tags have been enabled by default since 5.4 and there is no longer any means to disable them. Oh, and hi deathbeam. Welcome.
  4. Until fairly recently I felt the same, however, you should read the points brought up by Jacques1 again. In particular, I can't go past: "PHP is a template engine from the 90s. It doesn't have any modern features whatsoever: no template inheritance, no auto-escaping, no custom tags."
  5. This example should get you started: http://forums.phpfreaks.com/topic/11578-force-downloads/
  6. Any data in your system relating to this user needs to be stored along with an id that identifies it as belonging to this user. Then, your simply filter any queries by that users id.
  7. So why are you trying to use it? All of the above code needs to be thrown away.
  8. trq

    JS and PHP?

    One problem is, none of the values you are passing along with your post are being set. $.post( "send.php", { zProduct: zProduct, zBay: zBay, zMeasures: zMeasures, zDoor: zDoor, zPlinth: zPlinth, zMount: zMount, zBattery: zBattery} ); Where is zProduct, zMeasures, zDoor etc etc being set? Another issue, you have that same line wrapped in php tags. It's not php.
  9. So what do you want us to do?
  10. Sorry, but that code is terribly dated and isn't really a good example to begin with. Why learning php from a css site seemed like a good idea I'm not sure. Anyway, its seems you have display_errors switched of and maybe have error_reporting set too low. Check your php.ini which is well commented, and fix.
  11. No, the opposite. When classB extends classA you say that classB is a subclass of classA. If classA contains an instance of classB, classA has a classB. That would never make sense. A Device is not a Config. You only extend one class with another of the same Type.
  12. You probably want to look at generators for the most efficient way to loop through a files contents. <?php function getLinesFromFile($file) { $f = fopen($file, 'r'); if ($f) { while ($line = fgets($f)) { yield $line; } fclose($f); } } foreach (getLinesFromFile("yourlog.txt") as $line) { // do something with $line } This will only every load into memory a single line at a time.
  13. its not a competition. Nor is there such a thing as the "best" framework. Both Laravel and Symfony are nice, modern frameworks. Laravel is easy to learn and growing quickly and Symfony is just as solid as ever. Either of those two would be beneficial to learn.
  14. Code Ignitor is a dying framework that was poorly designed and terribly implemented in the first place. Don't waste your time. Find a modern framework to learn.
  15. We are not here to write code for people. If you have a specific question, ask it. If your looking for a programmer, hire one.
  16. You can connect to access databases using the ODBC driver. See: http://php.net/manual/en/book.uodbc.php
  17. Without relevant code we cannot help.
  18. Or have produced a fatal error.
  19. Start by posting some code. Using multiple objects of the same type in the same scope does not alone cause any issue.
  20. I think you missed a large portion of my reply.
  21. A description of your problem is generally helpful.
  22. Yes, you would fix that by checking the index exists (using isset) within the array before accessing it.
  23. PHP's only concatenation operator is a period, end of story. What you are mistaking for concatenation with echo and print are actually arguments. Function (or in this case language construct) arguments are separated by comma. Because echo and print are "language constructs" they do not need () brackets around their arguments either. If you look at the man page for echo, you see that it simply "Outputs all parameters". Hence, it kind of acts/looks like concatenation, but its not.
  24. We are not here to write code for people. Post what you have tried, and a description of your problem.
×
×
  • 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.