Jump to content

requinix

Administrators
  • Posts

    15,053
  • Joined

  • Last visited

  • Days Won

    413

Everything posted by requinix

  1. You've described some stuff that doesn't make sense. Like, you say "$this->debug" but I can't tell which class you're putting that in. Shouldn't it be more like $this->util->debug, or $this->pass->debug? 1. Post more code. Especially the stuff showing what $debug is and where it's being used. 2. Describe what you're trying to do. Because it sounds like you're approaching this in the wrong way - any time you need a class named like "Utility", that's an ominous sign. It kinda sounds like you're reinventing the concept of logging...
  2. Get what to work? What are you trying to do, what did you expect to see happen, and what actually happened instead?
  3. Given that the question involves .htaccess, I would certainly hope so.
  4. No, you're doing "this" (URL rewriting) with a .htaccess. "Order" of what, and who is talking about changing it? In some WP plugin? No. In the .htaccess you said you were using, yes - and my post reflects that. Okay. Great. But I don't see how "there is no /category in other places" is a problem? What matters is there is one for the URLs you're trying to redirect from. They have a /category. However, I'm not sure whether "/category" is a literal thing or not: you weren't using it at the start of this thread but you are now. Is "/category" the thing that appears literally in the URL? Or is it another variable value like the two things after it are? If it's a variable then you need to switch back to the /[^/]+ piece that was there before, but then you need to think about whether you have any other place on the site with URLs that look like "/site/thing/thing/thing/" - that is, "/site" (which may or may not be real) followed by three "directories" of navigation.
  5. What's the rest of your .htaccess's URL rewriting rules? Where you put this is going to matter, depending on what other rewriting you might be doing. Meanwhile this RewriteRule ^shop/[^/]+/[^/]+/([^/]+)/?$ /shop/$1 [R=301,L] is kinda close: it has the right number of "directories" in there, but it skips both the /category and the /jeans and only keeps the /mens-jeans. So while it should match, if put in an appropriate place, it wouldn't do what you wanted. ____$0______________________________ | __$1___ | | | | | RewriteRule ^shop /[^/]+ /[^/]+ /([^/]+) /?$ /shop/$1 [R=301,L] /shop /category /jeans /mens-jeans You know the first is "/shop" and the second is "/category", you know there's a third but you don't want to keep it, and you know there's a fourth that you do want, then RewriteRule ^shop/category/[^/]+/([^/]+)/?$ /shop/category/$1/ [R=301,L] (also added a trailing slash in the replacement URL, since it looks like you want those) With that, you need to confirm it isn't conflicting with anything else (hardcoding the "/shop/category" part helps with that) and that it's happening early enough in your URL rewriting process that it can actually do its job.
  6. if (!empty($titleElements)) { You didn't define $titleElements. Thus the $title is empty...
  7. Sounds like you're not submitting the data in the format the API requires. Check the documentation for what you should be doing and compare it to what you are actually doing. Also, maybe it's just me, but shouldn't that "Select Date" have, you know, some kind of date field associated with it? It's just empty...
  8. Post the row data in those three tables for that customer_id, and include what output you expected to see.
  9. No, because it varies depending on the different CSS and JS frameworks you're using. If you're using a framework then research what it supports in terms of responsive design. If you aren't, and you don't want to start using one, then learn about CSS media queries so you can write your own responsive rules, and also spend some time understanding your target audience so you know what size screens you should be designing for.
  10. Most of the time a responsive design moves horizontal elements gradually vertical. Right now you have Device Info and Network Settings in a left column and the settings themselves in a right column. The first responsive step towards a narrower design is to use one column and make the labels on the left be headings - which they might already be. Device Info ======================================= ... Network Settings ======================================= Ethernet Settings --------------------------------------- DHCP [ ] IP Address [__________] Subnet Mask [__________] Default Gateway [__________] DNS [__________] Side note #1: you really ought to support multiple DNS servers. You could keep the navigation anchors, which I assume exists, by moving the left column into a slide-out menu. To go narrower, you take the two columns of setting name on the left and setting value on the right and merge them into a single column of setting name then setting value. Device Info =================== ... Network Settings =================== Ethernet Settings ------------------- DHCP [ ] Enabled IP Address [_________________] Subnet Mask [_________________] Default Gateway [_________________] DNS [_________________] Side note #2: many interfaces for DHCP present it as a DHCP vs. manual/static option, not just a mere checkbox.
  11. Which API? If you're having trouble making your PHP code work then you'll have to post (the relevant parts of) your PHP code. Because
  12. First guess is that you didn't install correctly everything you needed to install. Because "no such file" (or directory) means the file doesn't exist, and clearly something expects that file to exist, so it probably needs to exist...
  13. To make sure I understand, you have two options: (a) Do three normal INSERT statements, and get the auto-incremented IDs of what you need (b) Do a normal INSERT and then craft a couple INSERT...SELECT queries based on the raw values you want to insert plus a reference or two to the IDs of the new rows you created that hopefully don't have any duplicates I'm thinking you should go for the simpler option.
  14. That's a browser error, not a PHP error. 271k rows of data on a page is ridiculous. Use pagination.
  15. You can't. Not from PHP. But Safari on any Mac that's been updated in the last couple years will support it. There are client-side options, if you really need to know. Or you could just, you know, not serve WEBPs to Safari.
  16. Seems fine. Check with your browser's developer tools about what the web page response is, and confirm that it's returning that Content-Disposition header. If not then something is getting in the way... And while you're there, see if the tools report any errors or warnings.
  17. Well, the easiest way would be to not render it in the first place...
  18. Yeah. "The targets are the Attribute::TARGET values." Plural. https://www.php.net/manual/en/class.reflectionattribute.php#reflectionattribute.constants.is-instanceof "Retrieve attributes using an instanceof check." Do you know how to "retrieve attributes"?
  19. https://www.php.net/manual/en/class.attribute.php
×
×
  • 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.