Jump to content

requinix

Administrators
  • Posts

    15,266
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by requinix

  1. Traits are copy and paste. If there is any meaning to the code besides you wanting to simply save yourself some copying and pasting then a trait is not the right answer.
  2. Obligatory "welcome to the world of software development". Things change. Try to anticipate and plan for what might happen, but otherwise you're kinda stuck just responding to changing business needs. Saying that everything gets an optional data structure of "stuff" makes sense. Not all chart types may need it, but a general purpose "stuff" thing doesn't sound unreasonable to me. It could only work if the pie and time charts could come up with some sort of reasonable default behavior. If not, then...
  3. The common denominator is that the method takes an ID, name or label, and extra data. For regular charts there is no extra data (so far...), for time charts there is some time thing, and for pie charts there is some data thing. Or alternatively, if there is any way you could modify the pie and time charts to work without the data/time thing, the common denominator is an ID and name/label. You could then use a new interface that provides an optional third argument according to whatever - optional so it remains compatible with the base interface.
  4. Maybe you're creating and recreating connections multiple times per script. Maybe your queries are taking too long. Maybe something else. Hard to say. Add and remove your new functions until you find out which one is causing the problem.
  5. What is the problem? What code have you tried and what was it doing wrong?
  6. So you may have noticed that the code you posted is a bit messed up. Can you try again? Hit <> to bring up the little editor window and paste into there.
  7. 1. The DNS for both domains needs to be the same IP address to the server - no aliases, no redirects, just a basic DNS setup 2. The web server needs to be configured so that both domains go to the same "site" The second part you may or may not be able to do, depending what you have access to. It's quite possible they may have locked this part of the process down enough so that clever people wouldn't be able to get around their paywall. Or maybe they didn't.
  8. Thinking about it as "relaxing" will lead you into conclusions like that. Contravariance is about making sure that if your class claims to be some Thing, it is capable of supporting at least as much as whatever the Thing could support. AnimalInterface says that it supports calling foo with a string argument #1 and a string argument #2. $animal_interface->foo($string_1, $string_2); If your Dog removes the type from argument #2 then that's okay because it still supports a string - it's just that it supports other types as well. $animal_interface = new Dog(); $animal_interface->foo($string_1, $string_2); // still works If your Dog removes argument #2 entirely then that's not okay because you no longer support that argument. Yes, PHP allows passing more arguments than required, and you could let you get at it through func_get_arg/s, however (a) that's only because of how PHP itself supports function calling, but more importantly (b) if your function doesn't care about argument #2 then there might be something wrong with it. Your example is too abstract to answer this effectively. What's the real situation?
  9. Is it just me or have you basically just stated that what you've been trying to do in this thread is impossible?
  10. That isn't quite the code you used. $_GET["sl"] still works, but you should test if that value exists with isset() first before trying to get it.
  11. Yeah no. One server can handle multiple websites. It's how a lot of the web works.
  12. In my very first post here I questioned why you were even having it redirect at all. I haven't changed my mind since then. You know how br-storage goes to your server? The server that has the website and all that? mullins-storage needs to do exactly the same thing. No redirects.
  13. It's on the right server but it's redirecting to br-storage.com now. The web server needs to handle both domains going to the same site.
  14. Must be a really old book. What you should do is actually learn how to program with PHP instead of throwing code into files and tweaking it until it works.
  15. If it needs to have access to all the requests and responses at once then you kinda have to go the RequestResponsePair route (though I'd pick a different name). But first I would try to see if maybe it could be refactored so that it can do a sort of "set up" step, process each request/response in turn, then "tear down" after. Depends why and how it's processing as a group.
  16. Here's a really simple reason that you should be able to understand: If your code doesn't do what you want it do then you need to recode things. We're talking about removing a couple lines and changing a couple lines. It's not rocket surgery. Read the other thread where we told you why you should use glob() until you figure out why. Because you don't understand what the problem is. No.
  17. Didn't we tell you to use glob()?
  18. Whatever is on lines 6029, 1252, and 9 of those files, that cannot happen if there has been any output. You can't put that <link> where it is. And it probably shouldn't be where it is to begin with.
  19. What they did was host mullins-storage.com on their servers, and the webpage they present uses an iframe to load br-storage.com. That's not good. It also doesn't support what you want to do. You need to point both domains to the same server, then make sure your web server tries to serve both sites... however they need to be served. I don't know what "deluxe hosting" is but you're probably getting close to it.
  20. If you really don't know what . and .. are then you need to research the very basics of how every single filesystem in existence works. $file is not a full path to the file. It's just the name of the file. So the question is whether you think is_dir("_photos") should say true or false.
  21. requinix

    maha

    Can you link the website?
  22. requinix

    maha

    Good first step. Now what about the other things I said?
  23. requinix

    maha

    Make sure all databases, tables, and columns, as well as the connection settings, use UTF-8. Make sure your PHP files are saved with UTF-8 encoding. Make sure your webpages use UTF-8 encoding.
  24. The compression function is not the problem. Anymore. After you moved that imagejpeg line. So now let's go back to an earlier question: where do you expect the images to go? Have you been looking in the same directory as the PHP script?
  25. Yes. Apache is logging errors to a file. Open the file and look at what is inside. Or wherever. Yes: the session cookie settings.
×
×
  • 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.