Jump to content

requinix

Administrators
  • Posts

    14,233
  • Joined

  • Last visited

  • Days Won

    369

Everything posted by requinix

  1. If the page does not look the way you want then it is not correct.
  2. Removed? No, if anything you should be adding rows. Because Bootstrap's grid system relies on using that row > col structure. But don't mind that for the moment. Start with looking at the HTML in your browser. Is it correct? If not, adjust it in the browser until it works correctly, then port the changes you made into the PHP code.
  3. <div class="<?php echo $cont <= 2 ? 'col-6 pb-3' : 'col-4'; ?>"> This looks correct: for $cont=1-2 you use "col-6 pb-3" while for $cont=3-5 you use "col-4". Look at the HTML being outputted for this portion of the page. Does it look correct too? Do you need to add a couple <div class="row">?
  4. Partial Git commit hashes, so people can see the actual change itself.
  5. "Don't do a thing unless you have a good reason to do the thing" is all-around pretty reliable advice.
  6. That's not your full code. That's a series of screenshots of your editor showing one screenful after another of one particular file that has PHP code in it. I don't know why you thought that was an appropriate change because my educated guess is that the "txt_email" comes from a form and not a cookie. Then again, if educated guesses were enough to go on, these forums wouldn't serve much of a purpose. Stop using $_REQUEST and switch to $_GET (for query parameters) or $_POST (for submitted forms) or, yes, $_COOKIE (for cookies). Only one of those should ever be the correct source to use.
  7. PHP support for a 45-year-old protocol? Odds aren't good. If you can find some C code for it then you could translate that into PHP code. Or if you were really serious then you could instead write a PHP extension around it.
  8. array_diff will try to compare values like they were scalar values. For example, as strings. Thus the warnings about converting an array to a string. What you tried after that was throwing random code at the problem and hoping it would go away, which is inefficient and rarely ever works. If you want a simple comparison between the values then use array_udiff() with a function that does a simple comparison - such as by using the <=> operator. array_udiff($table, $newdata, fn($a, $b) => $a <=> $b)
  9. If you are getting the exact same error then you did not change the code correctly or completely.
  10. ...and? Take a look at your output: the MD5 hash on the left and the value of $element on the right. If you want to skip the md5-container then that would be when $element is...? For a more useful solution, if what you care about is when the filename is "md5-container" and not what directory it's in then use a function like basename to get just the filename portion of $element. But perhaps a smarter solution would be to not put your md5-container inside the directory you're trying to inspect. Don't have to skip over something if it's not there in the first place.
  11. Get rid of that iterator_to_array. It's useless at best and wasteful at worst. If you want to exclude something then you could write code to do so. Have you tried that yet? You could make use of one of the other existing iterators or simply look at $element directly.
  12. "Correlation does not imply causation." Looking through the source, it looks like the ones that support it are: RecursiveIteratorIterator, IteratorIterator, FilterIterator, RecursiveFilterIterator, CallbackFilterIterator, RecursiveCallbackFilerIterator, ParentIterator, not SeekableIterator, LimitIterator, CachingIterator, RecursiveCachingIterator, NoRewindIterator, AppendIterator, InfiniteIterator, RegexIterator, RecursiveRegexIterator, not EmptyIterator (duh), and not RecursiveTreeIterator. If there was a link then your quote of kicken's post would have included it...
  13. A lot of the iterator classes in PHP do some screwy things. This is apparently one of them: it implements (an internal version of) __call that sends method calls to the inner iterator. So you're getting magic behavior. Why does it do that? I don't know. It dates back to PHP 4 and I wouldn't be surprised if nobody has thought about it since then.
  14. Seeing the two table schemas and some examples of what data you have and what you want to get from it would nice.
  15. Threads from 2013 are not good places to ask for help. Even if they're on the same esoteric subject. Now that you have your own thread, try posting the code you have and a detailed description of what your problem is.
  16. You should find another tutorial: the code they've convinced you to use is... well, it's silly. It pointlessly uses encryption for something that doesn't need to use encryption. If you want a remember me cookie then all you need is to store a long random token in your database and associate it with the user - preferably in one-to-many form so the user can have multiple tokens for multiple devices. Store it in the browser with the Secure and HttpOnly flags. Then, every time the token is used to log someone in, you generate a new token and replace the old one.
  17. hex2bin converts a hexadecimal string into a binary string. Is that what you want to do? Convert a hexadecimal string into a binary string?
  18. They're both correct. Compare the two. Can you see what's similar between them and what is not? Do you see a pattern to it? The difference is what properties are accessible.
  19. Stuff doesn't break randomly. If the certificate is the problem then your browser should be logging some errors about it. If not, something else probably changed, and the browser will probably have some errors about it.
  20. Book? Books take time to publish. That means they are never up to date with latest standards and practices, and trying to publish early is risky. Any reason you don't want to use any of the millions of online resources?
  21. https://www.google.com/search?q=eloquent+enable+query+log
  22. Look for a toSql() method, or Eloquent has a query log you can enable.
×
×
  • 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.