-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
$('.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.
-
What PHP extension would you like to have?
requinix replied to yoursurrogategod's topic in Miscellaneous
How about looking through the PHP bug list, investigating bugs, and submitting patches? -
You put literally "pid" in the string. If you want a variable then concatenate it in just like you did for the '.likehide'+pid.
-
Sounds like you should be parsing the JSON instead.
-
echo '';
-
.htaccess isn't redirecting as I want it too.
requinix replied to sphinx's topic in Apache HTTP Server
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] -
.htaccess isn't redirecting as I want it too.
requinix replied to sphinx's topic in Apache HTTP Server
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? -
.htaccess isn't redirecting as I want it too.
requinix replied to sphinx's topic in Apache HTTP Server
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. -
.htaccess isn't redirecting as I want it too.
requinix replied to sphinx's topic in Apache HTTP Server
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] -
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.
-
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.
-
$page_contance = str_replace("{".$K."}",$V,$page_contance_before);Because you keep replacing from the original string, not the one that has previous replacements.
-
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).
-
But don't you need that "it"? It tells you the language...
-
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.
-
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"; }
-
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.
-
Sounds like you're missing a file or two.
-
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.
-
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).
-
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?
-
Try without MultiViews too. Options +FollowSymLinks -MultiViews
-
Coloring usernames in table based off IP Address?
requinix replied to Lukeidiot's topic in PHP Coding Help
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.