Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. ...There is only one primary key in a table. You mean a composite key? A primary key with more than one column?
  2. You're contradicting yourself... In those cases you do only want immediate descendants. Unless you're talking only about what is visible to the user at a given time - are you constructing the entire menu hierarchy at once and showing/hiding trees as the user accesses the menu?
  3. It depends on how your site works. Your method for building $url_path is odd* but for all I know that's intentional. Though I will say you should have links for the crumbs if at all possible/sensible. * Normally you get breadcrumbs by looking at the structure associated with whatever page is being served. This may or may not be reflected in the URL structure: phpfreaks here only shows "topic/277963-*" in the URL but there's actually a hierarchy of Forum > PHP Coding > PHP Coding Help > This thread.
  4. Improve it how? More "dynamic" how?
  5. If it's still writing stuff to a file then the script has not hung: it just doesn't look like it's doing anything...
  6. You call them "old" and "new" and that seems the complete opposite of what it looks like you want to do. Are you trying to use links like /blog/?tag=facebook/page/5/ and make them behave like /blog/?tag=facebook&paged=5?
  7. Have you checked your error log(s) yet?
  8. I meant server logs, not Cake's logs.
  9. You only need the quotes when you define the constant. define("SERVER", "localhost");Afterward, no quotes. $connection = mysql_connect(SERVER, USER, PASS);Otherwise PHP thinks you have a regular string and will happily use those as the values.
  10. should be a hint. You sure you have the right hostname?
  11. Couple things to take into account: - How often will you add new categories? Move or remove ones? - Do you only need all ancestors and all descendants? Will you ever need to know only immediate parents or immediate children?
  12. Stop doing that. Use a join. It will work.
  13. 1. Probably Cake. 2. Some server setups will send 500s if there's an error with the PHP. Look at your error logs.
  14. $links is the result of a query which retrieves the data. It is not the query that gets a total count. You can't use it to calculate $pages.
  15. SELECT * title GROUP BY keyword ORDER BY idLook at that query. Does anything seem wrong about it? If not, take a step or two away from your monitor and look again.
  16. Yes. Just for clarity, they're telling you that they've blocked outbound connections unless you ask for it and/or that's the reason your stuff is failing?
  17. That's true. Only exception is an active (ie, non-passive) FTP connection. Blocking outbound ports is unusual. Are you sure that's the problem?
  18. You can't have it in there. Period. Why do you think you want it?
  19. Even safer is <script type="text/javascript"> var id = <?= json_encode($id) ?>; </script>(language=javascript has been deprecated for a long time)
  20. Since the most obvious function copy() will not copy whole directories, make a recursive version. Then call it.
  21. No, it's not. You need to learn PHP before you try to write code for it.
  22. You say you dumped out $_FILES. What exactly did it contain? Of particular interest is the "error" value. [edit] And since you didn't post it, is the using the right enctype?
  23. You have to write out an entire <script type="text/javascript"> document.write("<scr" + "ipt type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" + GKey + "&sensor=false'><" + "/script>"); </script> <script type="text/javascript" src="gmap/util.js"></script> <script type="text/javascript" src="gmap/killerTornados.js"></script>
  24. Both the file_get_contents() and cURL versions should work. If they're timing out then there's a problem accessing that URL. For example, are you sure you have the right hostname? And that it really is on port 8080? By the way, if you're just outputting it then a header() redirect may be appropriate (I don't know what "header redirect problems" are) or, if it has to be code, readfile.
  25. Can't help but notice you're saving the thumbnail to $target_path and putting the metadata in $filename.
×
×
  • 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.