Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by requinix

  1. "£{$pom}" ?? "Even"; "£{$pom}" is a string. It will never, ever be null. It may be a shock to you, but the ?? operator is not the right hammer for this screw.
  2. That is not valid PHP syntax. Besides, the base-64 stuff is for file_put_contents. According to the documentation, file_put_contents returns "the number of bytes that were written to the file". That does not help you. Close, except you're not using valid PHP syntax here either. Programming is not a matter of throwing stuff into your IDE until it works. You have to actually understand what things mean and how to use them. Copying and pasting stuff might eventually get you the right answer but it's going to be a pain in the butt until you get there.
  3. The "actual filename" will be file_put_contents('./Collection_Posts/'.$file, base64_decode($uri)); ./Collection_Posts/$file. If you can write to that file then you can read from it and attach it to an email too.
  4. Look at what that query does. It returns an ID and a name. But how do you know what table they came from? You don't. You need to put something into the query that tells you the table. Something that is different for the two table sources. For example, one could use the string "pr" and the other "pt". Or maybe a nicer value than those, such as something I wouldn't know because "pr" and "pt" are terrible names for guessing about what their tables are for. Or why there are two tables as similar as they are.
  5. I don't see any syntax errors in what you posted. Get yourself a decent IDE that supports syntax highlighting for PHP and it should be able to pinpoint where the issue is.
  6. Then there's something going on that I can't see. Most likely because I'm not sitting at your computer. Change the alert() to a console.log() and make sure you see that happening.
  7. Are you sure your script is even running at all? Can you see the network request happen? Can you see the response?
  8. Then what do you get? Have you checked your browser's developer tools to see if there were any errors?
  9. Unless you are somehow processing those images, PHP isn't doing anything. In fact if you're linking to the images directly then PHP really isn't doing anything. The fact that the images are displayed using HTML that was outputted through PHP is completely irrelevant. The orientation is controlled by EXIF data. It acts as a suggestion to things displaying the image, informing them of how the image is intended to be displayed. When you see the image oriented incorrectly, that's the actual image. So my advice is to not use EXIF data. Before you upload those images, load them into some image editor and have it fix the orientation for you. Most editors are capable of this - some even prompt you about it when you first open the image.
  10. How are you uploading these images to your website? Is there any image processing happen? What and why?
  11. I understand what the problem is. Do you understand what I said the solution is?
  12. You have to put something in your query so that you can tell where each result is coming from. Then use that to output the correct link.
  13. Yeah. Firewall off everything you can as strictly as you can, and use non-standard ports for private services like SSH.
  14. Perhaps you would like to be so much like an AI bot it's funny. me made your day?
  15. That's pretty much exactly what I said you needed to do, so...
  16. Pick the one that looks most reputable and looks like what I'm about to describe, try it again, and if that still doesn't work then post exactly what you did. There should only be one redirect: if the URL isn't www or it isn't HTTPS then redirect to the HTTPS+www URL. We use them for the certificate but handle the server configuration ourselves.
  17. If you can't get it to work then that means you tried something. What did you try and what happened when you tested to see if it worked?
  18. The term you are looking for is "AJAX".
  19. mod_xsendfile is not bundled with Apache, that is correct. You have to go download it.
  20. If you are running Apache then you can install Apache modules.
  21. To be clear here, what do you mean by "shell the site"?
  22. Hmm. Apparently I misread the desired output and totally didn't see the whole "split by underscore" bit. That adds a little more difficulty than I had accounted for. The one-liner was array_merge_recursive( array_fill_keys($keys, []), // initialize to key => [] ...array_map( // flatten outer values array $values => array_combine($keys, $values), // inner values arrays get keyed $arrayValues ) ) Dealing with the keys too will be getting more complicated than I would like to see in a single statement.
  23. Hint #2: I gave you the function calls in order, so array_fill_keys to get one array, array_map with a simple callback that uses array_combine, and finally array_merge_recursive with both results. Hint #3a: array_fill_keys starts off your output array with no data, array_map processes your data array, array_combine does the most logical thing it can do under those circumstances. Hint #3b: If array_merge_recursive tries to merge an array and a string, it'll add the string into the array.
  24. Want a hint? It's a pretty big one. array_fill_keys + array_map with array_combine + array_merge_recursive One-liner.
  • 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.