Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. $('.likehide'+pid).html('unlike');No you haven't. It still has "pid" directly in the string. [edit] See that green? That means it's a string. "pid" is in the green so that means it's a string too.
  2. How about looking through the PHP bug list, investigating bugs, and submitting patches?
  3. You put literally "pid" in the string. If you want a variable then concatenate it in just like you did for the '.likehide'+pid.
  4. Sounds like you should be parsing the JSON instead.
  5. Because the URL it's redirecting to is wrong. Specifically, it needs a trailing slash after the domain name. Does seem like escaping only happens to captured groups used in the replacement URL. RewriteRule ^ http://mxtoolbox.com/?url=http://www.newsite.com${escape:%{REQUEST_URI}} [R=301,L]
  6. I understand what you're saying. That was never a problem. You want to redirect to some website which then redirects to your new website. I'm asking, with the latest changes to the .htaccess, where does that first redirect actually send you? Where on the "some website" (anotherwebsitetrack.com, now) are you being sent? What is that URL?
  7. Is it not escaping?... RewriteRule ^ http://scripts.newsite.com/AFClick.asp?blablaID=111&merchantID=111&programmeID=111&mediaID=111&tracking=bla&url=http://www.newsite.com${escape:%{REQUEST_URI}} [R=301,L]Can you tell exactly what URL you're being redirected to from here? Where at scripts.newsite.com you go, that is; it apparently will redirect to that "url" you pass in but I want to know what the URL for the first redirect is.
  8. RewriteRule doesn't operate on the query string. You have to add that in yourself. Try RewriteEngine on RewriteCond %{HTTP_HOST} =oldwebsite.co.uk [OR] RewriteCond %{HTTP_HOST} =www.oldwebsite.co.uk RewriteRule ^ http://scripts.newsite.com/AFClick.asp?blablaID=111&merchantID=111&programmeID=111&mediaID=111&tracking=bla&url=http://www.newsite.com%{REQUEST_URI} [R=301,L]
  9. Why do you feel the need to convince them of it? Why don't they want to?
  10. You can do it with a simple for loop, actually. $start = strtotime($appsCheck->jobIntStTime); $end = strtotime($appsCheck->jobIntFiTime); for ($time = $start; $time $hhmm = date('H:i', $time); $times .= "\t\t$hhmm\n"; }Consider whether it's possible that the end time won't be a multiple of 15 minutes after the start time, and if so whether that matters.
  11. That means the query failed. Unless I'm going blind I don't see anything obviously wrong. Use mysql_error() to get an error message about what happened.
  12. $page_contance = str_replace("{".$K."}",$V,$page_contance_before);Because you keep replacing from the original string, not the one that has previous replacements.
  13. What you need is a JOIN. SELECT $fields FROM `books` JOIN `userBooks` ON `books`.`tag1` = `userBooks`.`tag1` WHERE `userBooks`.`user_id` = $user_idIf any of the $fields are ambiguous as to which table it comes from (eg, tag1 is in both tables) then you need to prefix the table name (eg, books.tag1 or userBooks.tag1).
  14. But don't you need that "it"? It tells you the language...
  15. The problem is you're assuming something's in an array when it actually isn't. You should check if it is first. And there's probably some logistical problem with the code that I can't tell because I have no idea what this code is.
  16. Using SimpleXML I take it? Try to avoid variable variables when there are alternatives like xpath(). $tag1 = (string)$xml_a->lookuptag1; $tag2 = (string)$xml_a->lookuptag2; $nodes = $xml_b->xpath("/b/{$tag1}/{$tag2}"); foreach ($nodes as $node) { echo "Found {$node} \n"; }
  17. I don't remember there being any "shipToList" element anywhere. There's something for shipping but that's only during a transaction, not while creating a payment profile.
  18. Sounds like you're missing a file or two.
  19. So it worked? Great. MultiViews allows you to omit extensions from existing files, so with it enabled /index will be automatically translated to index.php. By the time mod_rewrite and your RewriteRule kicks in, the request has already been "rewritten" to /index.php, the REQUEST_FILENAME !-f will not be true, and your URL rewriting will not trigger.
  20. Are you... looking for someone to do this for you? Or help doing it?
  21. Its job is to make sure there aren't too many imports happening at once, but don't worry about it until the imports start becoming a problem (if they ever do).
  22. I would do the upload with a command-line script. Create a table with information about each upload, like who started it when, where you've relocated the file (temporarily), and what state it's in (like waiting to import, being imported, and finished). Move the file to the new temporary location and create a row for the import. Then make a command-line script that does the import itself. You pass it the ID number of the import from the new table, it does the import and updates the status as it runs. You can run it in the background like exec("nohup /usr/bin/php /path/to/importscript.php {$jobnumber} &"); (that's for Linux only) When displaying you should look at the import status first so you know whether it's finished or not. If, in the future, this results in too much server load because too many imports are happening at once, you can change it to use a queuing system... 3MB for an import file should not result in 15m to display what it contained. Do you have indexes on the proper columns? What does that code look like?
  23. Try without MultiViews too. Options +FollowSymLinks -MultiViews
  24. I wrote pseudocode, not PHP code. You're supposed to read what I wrote as if it were a more technical and precise version of English, understand what it's doing, and translate that into actual PHP code.
×
×
  • 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.