-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
[eclipse] open php file without extension
requinix replied to rick645's topic in Editor Help (PhpStorm, VS Code, etc)
Strider is probably on the right subject. URLs don't have to match files. You can have a file named "whatever.php" and show it in a URL as "whatever" - or anything else you want. So keep the file extension, and if you want your URLs to look a certain way then make the URLs look the certain way. -
confirm() will present a browser dialog with a "confirm" button (eg, Confirm or Yes) and a "cancel" button (eg. Decline or No or Cancel).
-
[eclipse] open php file without extension
requinix replied to rick645's topic in Editor Help (PhpStorm, VS Code, etc)
You're saying that you don't believe programmers should be using file extensions? -
[eclipse] open php file without extension
requinix replied to rick645's topic in Editor Help (PhpStorm, VS Code, etc)
Without a file extension, your system has to guess what type of file it is based on the data. Apparently, it guessed "map-path". And your PHP Editor doesn't know what to do with "map-path" files. Give your PHP files the .php extension. It's what you're supposed to do. -
How do I count results in a nested array generated by Preg_Match
requinix replied to marmelade7's topic in PHP Coding Help
preg_match_all returns the number of matches. Come back next week when your head has cooled off. Or don't. -
How do I count results in a nested array generated by Preg_Match
requinix replied to marmelade7's topic in PHP Coding Help
Did you check the link I gave? It pointed you to the Return Values section (or at least it was supposed to). -
How do I count results in a nested array generated by Preg_Match
requinix replied to marmelade7's topic in PHP Coding Help
If it works in one file and not in another then you likely have some sort of problem with variables. Namely, that $txt one. Side note: don't count the matches like that. -
Once again: I'll even point you in the direction of using RewriteCond to perform that check.
-
There are no duplicates in that output either. Look at the Grader column: every value is different. That means every row is different. You need to describe what data you want to get with a query. What rows do you want? What values do you want? What rows and values do you not want?
-
can not get iframe to grow to 100% of viewpoint
requinix replied to jasonc310771's topic in HTML Help
A height of 100% fills to the parent's height. If you want the full height of the viewport then (a) make sure the parent element - and its ancestors - are the full height as well, or better yet (b) don't use percentages and use actual meaningful units like vh. -
I don't see any duplicate rows in that output. 1. What data do you have in the tables? 2. What is the query you are executing? 3. What results do you want to get, and why?
-
getting both ipv4 and ipv6 address of user
requinix replied to jistanidiot's topic in PHP Coding Help
The way they do it is they give the user something to connect to that supports only IPv4, and then another that supports only IPv6. Then they combine the information together to give you the full results. Because all you can ever get from the user is how they connected to your site. If they used IPv4 then you can't know what their (public) IPv6 address is. -
Trying to access array of offset with if statement
requinix replied to PNewCode's topic in PHP Coding Help
What will your code do if there aren't any rows from the query? (I know the answer - I want you to read through it and think about what will happen) -
Given that the CSS you wrote is invalid and what you're trying to do isn't supported, Either restructure your HTML so that the input and your <p> are sibling elements, thus allowing you to use ~ or +, or use Javascript to apply a CSS class somewhere useful or to show/hide the paragraph element itself.
-
Let me put it this way: you can't use Javascript to show or hide something without also using CSS.
-
That describes the "ListDevicesDB" API you can call. 1. It uses the GET method. 2. You need to include a "token" header that includes some value. If the value is what you included in your post then that needs to change because this was (probably) supposed to be a secret value and you've now shared it with the whole internet. 3. The URL is as given there. It optionally supports a "deviceSerial" query string parameter, as the description indicates. 4. It doesn't describe what the return value is. So you need to get a basic API calling thing in place. You can use libraries for it, or you can write the API calls yourself using cURL. Your first step should be to understand more about making API calls through PHP. It's all the same everywhere - only differences being exactly what the API wants, and that's the information they gave you. Once you understand a little more about API calls, then you can deal with the PHP code to try to make them. It's pretty simple but you do need to know more about what this is all about to be effective at it.
-
Are you sure you edited the right file? Did you restart Apache to pick up the changes?
-
Create link out of a global and set a variable
requinix replied to LeonLatex's topic in PHP Coding Help
Print out the value of the DOCUMENT_ROOT and see what happens when you try to add "../includes/db.php" to it. -
RDP servers are notoriously risk-prone. It's almost always a bad idea to have them open to the internet for anyone to connect to. By "tunneling" through the VPN, the RDP server remains disconnected from the internet, but you can still access it by connecting to the VPN (which is going to be much more secure). Ditto for the remote server. In your case apparently you need two hops, presumably because it's not accessible over the VPN directly, but the point is the same. It's very common to have a database server not connected to the internet, to minimize risk, so to allow access you can VPN or SSH into the network and then tunnel to get a direct database connection.
-
If we're still talking about the original issue, my reply was trying to point out that you were rewriting everything when you should be rewriting only the things that don't exist. Also, followed by is funny.
-
Preview? They might not have a name per se...
-
It's rather unlikely that GoDaddy is running a PHP that isn't using mysqlnd. And I'm not sure that existed in the time of PHP 5.2. So this situation you're describing seems backwards. First things first, though: PHP 5.2 is extremely out of date. You need an version of XAMPP that has PHP 7.4 - to match what your real website is running. Frankly, I'm amazed XAMPP even provides PHP 5.2...
-
If you're looking to hire somebody, try the Job Offerings forum. If you need some help doing the work yourself, we have a few forums according to the topic, such as PHP Coding Help and MySQL Help.