Jump to content

requinix

Administrators
  • Content Count

    13,051
  • Joined

  • Last visited

  • Days Won

    300

Everything posted by requinix

  1. Fake it with position:absolute and push it to the edges of the cell? Leaves you with a vertical alignment problem though.
  2. To answer the question itself, check your assumptions about those placeholders and the template file. But this is all wrong. Creating files like this is definitely not the way to go about it. You say this is for learning purposes, right? Then you should definitely want to learn the right way to do it. Given that the template stuff isn't working correctly (or rather, why it isn't working correctly) I can't quite say for sure exactly what it is you need to do. What I can tell you is that should be having one single PHP file handling every "page". A file that will probably look a lot li
  3. ...which is a problem that can be solved with a very simple application of math.
  4. As far as I know, the buffering always happens for POST requests. It's an internal detail that allows people to read the request body multiple times - no buffering means it could only be read once (and by PHP itself).
  5. curl_setopt($ch, CURLOPT_URL, "https://connect.sandbox.creditsafe.com/v1"); Where's the /authenticate? And please, pay more attention when you try to post code. Hit the <> button, paste your code into the popup, and insert. The result looks like what I did above.
  6. So, understand that they're not going to write code for you. For assorted reasons. What they've done is provide a fairly standard amount of documentation that assumes you already have some knowledge about using APIs. The /authenticate docs say: - POST /authenticate (that tells you the method and URL path) - Request body is JSON - Body is an object that includes "username" and "password" keys, whose values are strings - It can return 200 or 401 - The 200 returns a JSON object with a "token" key - The 401 returns a JSON object with a "message" key Again, they assume you hav
  7. The problem is that all of that stuff varies with usage. Each place may want different templates, or different Javascript, or different CSS. It doesn't make logical sense to put frontend stuff into the backend. XSLT is about transforming XML into something else. Like HTML. For example, if you had XML <username>NotionCommotion</username> then you could write some XSLT which transforms <username> nodes into <span class="username"> HTML elements. It's been a long time since I've done this but the XSLT looks something like <xsl:template match="u
  8. What's an example (with a link) of something in the documentation that you know you need to use but are having a hard time understanding?
  9. Sure, but the result is that instead of getting a directory index you're going to get a 403 Forbidden page. So that's not going to help.
  10. I don't mean reading documentation about sending JSON to "an API", I mean reading CreditSafe's documentation about sending JSON to their API. Specifically. It should talk about important subjects like authentication, and how to deal with usernames and passwords and tokens.
  11. Or put another way, no. Shared hosting needs those prefixes so that other people using the same servers won't have their database names conflict. But it's just a database name. It doesn't matter. Let it be "ccuk_hello-world" (or better, don't use a hyphen in an identifier and call it "ccuk_hello_world") and move on.
  12. Well there ya go. The system temp directory should be writable by virtually everyone - it's the temp directory, it's supposed to be usable for creating temporary files.
  13. There is a way, but it would be "crappy code". If the problem is seeing "index.php" everywhere then figure out a way to resolve THAT. For example, by not having a dozen tabs open. Or by seeing if NetBeans can give you more path information.
  14. You're going to have to read the documentation about this. If it talks about something you don't understand, stop and learn about it.
  15. Doing what you're doing is a dated practice. The industry has moved on to templates and such. But this method isn't inherently wrong. In time, you'll probably change to do something else. And that's fine.
  16. You found one of the text-transforms. Now find the others.
  17. Nothing was wrong with the rewriting... I think. Nothing that I remember seeing, at least. The rewriting isn't responsible for the directory index - the fact that your files are not called "index.php" is.
  18. Can't diagnose a black stroke if we can't see it. The SVG on that page you cited only uses #F7F7F7 to match the page's white background color.
  19. This behavior is related to the SAPI - that is, the thing PHP interacts with when it needs to do stuff like read incoming request bodies. So which are you using? php-fpm? mod_php? Does that have any relevant settings that may explain why it couldn't buffer the request body?
  20. { "correlationId": "6c2dc370-59a0-11eb-893a-0223445bacd9" } Is that the JSON you're expecting to receive? If so, everything is going right - except for the part where you told cURL to return the response headers in its output, which you probably don't need to care about.
  21. I can't tell what you were trying to ask, but I think the answer is still what I said before.
  22. So what's the question? Oh, found it. Some existing framework or strategy to do what part, exactly? If the general problem is how to deal with multiple MVC frameworks, the answer is typically to have a code interface that does as much work as possible so that the framework endpoints can do as little as possible. If you're asking about literally converting JSON to HTML, I think the coolest option is to forget JSON and go with XML. Because that can use XSLT to render the data however you want.
  23. Add the if_gender to the list of SELECTed fields as well as the GROUP BY. Then you'll get one set of results that shows the count per age range and gender.
  24. Okay. Well, so far all you have to work with is "Cannot POST". That's not helpful. How about getting some more information? Perhaps why it thinks it "cannot POST"?
×
×
  • 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.