-
Posts
15,053 -
Joined
-
Last visited
-
Days Won
413
Everything posted by requinix
-
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...
-
Trouble with Xdebug Breakpoint using Sublime Text
requinix replied to VaderDark's topic in PHP Coding Help
What breakpoint? What code? -
Get what to work? What are you trying to do, what did you expect to see happen, and what actually happened instead?
-
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.
-
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.
-
Custom Path To Pear On Shared Hosting Enviroment
requinix replied to mcfc4heatons's topic in PHP Coding Help
Want to give that another shot? -
call spl_autoload_register() without parameters
requinix replied to rick645's topic in Miscellaneous
Autoloading is for classes. -
php Crawled websites not inserting into my SQL table | PHP Web Crawler
requinix replied to ssscriptties's topic in PHP Coding Help
if (!empty($titleElements)) { You didn't define $titleElements. Thus the $title is empty... -
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...
-
Responsive page for network settings saving
requinix replied to Daniele80's topic in PHP Coding Help
That's not responsive. -
Post the row data in those three tables for that customer_id, and include what output you expected to see.
-
Responsive page for network settings saving
requinix replied to Daniele80's topic in PHP Coding Help
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. -
Responsive page for network settings saving
requinix replied to Daniele80's topic in PHP Coding Help
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. -
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
-
Inserting data into 3 tables, one after the other
requinix replied to webdeveloper123's topic in PHP Coding Help
That does sound simpler, yes. -
Inserting data into 3 tables, one after the other
requinix replied to webdeveloper123's topic in PHP Coding Help
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. -
PHP Page is not displaying the full data. Getting time out
requinix replied to Senthilkumar's topic in PHP Coding Help
That's a browser error, not a PHP error. 271k rows of data on a page is ridiculous. Use pagination. -
Safari do not send image/webp in accept headers
requinix replied to hebrerillo's topic in PHP Coding Help
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. -
Headers to force file download in browser not working
requinix replied to Vasily47's topic in PHP Coding Help
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. -
Well, the easiest way would be to not render it in the first place...
-
What is it for ReflectionAttribute::IS_INSTANCEOF
requinix replied to rick645's topic in PHP Coding Help
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"? -
What is it for ReflectionAttribute::IS_INSTANCEOF
requinix replied to rick645's topic in PHP Coding Help
https://www.php.net/manual/en/class.attribute.php