-
Posts
15,232 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
1. Are you actually using "old.php" and "new.php", or are those placeholders for the real filenames? If so then what are those filenames? 2. Have you tried the banner one yet? Does that work?
-
Stick the [R] flag back in. What happens now?
-
You do have the new.php in place, right? What does your access log say the 404 was for?
-
Do an UPDATE where you set the value of the new column = the old column.
-
1. I can never keep straight whether leading slashes are needed in a particular RewriteRule. 2. The [R] flag will redirect. Since you want the URL to remain unchanged, don't redirect. Also [NC] is probably unnecessary. 3. The replacement URL is not a regular expression - just a regular string. RewriteRule ^/?old\.php$ new.php [L] As for the banner thing, I take it "example-user-type" can be any arbitrary filename? It's a little harder since you need to include "the request must not actually exist as a file or directory" conditions. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/?banners/(.+) banners/createpage.php?banner=$1 [L] You may want to be more restrictive with the ".+" since that will allow absolutely anything, and you didn't explicitly say so but createpage.php may not need the ?banner= (as far as I know it might look at the original URL automatically).
-
Why Does Query String Not Work With Spaces Or Dashes .. ?
requinix replied to spacepoet's topic in PHP Coding Help
str_replace() would be fastest but there's more to it than just that. (raw)urlencode() on top of that is probably a necessity too. You can also use regular expressions to get more powerful replacing logic - not just spaces. If so, what characters do you want to allow in the URL? Obviously letters, numbers, and hyphens, but are there any others? Apostrophes show up in names occasionally. How about accented characters? -
STR_TO_DATE would be a great place to start looking. Actually that's the only thing you'll need.
-
I'm lost. Under what conditions, dealing with $Family/FamilyID and $user/username, do you want to [a] proceed with whatever or show the error message?
-
What do you have available? Direct access to the Apache configs? Some other configuration software? A webmaster/sysadmin?
-
Why Does Query String Not Work With Spaces Or Dashes .. ?
requinix replied to spacepoet's topic in PHP Coding Help
So it stops at the first space? What's your exact code that deals with outputting links and/or anything related to this URL. -
Why Does Query String Not Work With Spaces Or Dashes .. ?
requinix replied to spacepoet's topic in PHP Coding Help
Well, there is a missing & between the myPageURL and the myLocationContent... If that doesn't fix it, exactly what URL are you trying? -
After Selecting Form Database How To I Preserve The Variable?
requinix replied to BrettHartel's topic in PHP Coding Help
Variable names are case-sensitive. $_Post != $_POST (and guess which one is right). -
Check the PHP extensions, make sure they're all up to date with your version of PHP. You can disable them all, (check that the segfault goes away,) then reenable them one by one until the error comes back.
-
How about stracing the script with "strace ..."? It'll probably output a lot.
-
So the function returns the widest range between those two dates? Two questions: 1. What would it return for "days" between April 10th and May 4th? 1-30? 2. What does it return for the "month and year" option?
-
I've noticed programmers are not as fast or accurate at typing normal sentences than non-programmers (who type a similar amount). We may use the keyboard a lot but we use it differently than, say, office secretaries. As for the game... man, that font can be annoying. t and f and l and j all look the same to me, and when the word is "tend" you really need to know what that first letter is. And when I hit "l" or "f" incorrectly and start typing some completely different word, that really throws me off. Especially when the words stack on top of each other and you can't read them accurately. Annoyances aside it's great typing practice. Oh. Saw a couple NSFW words too, like one you might say after "I'm". That was funny.
-
Try with just a single for loop, but you have to wrap the month number around yourself. for ($mm = $start_m, $yy = $start_y; $mm <= $end_m || $yy <= $end_y; $mm++) { if ($mm == 13) { $mm = 1; $yy++; } // ... }
-
It's also quite possible you're thinking of the HTML 5 type=search INPUT. <input type="search" ... /> Recent browsers typically show a little search icon inside the text field.
-
And you can't put the Deny/Allow in the proxy's .htaccess?
-
Not a fan of undeprecating and repurposing var. I like the idea of namespace-level accessibility but I'd rather see a new keyword for it, like "internal". There's also the question of whether sub- or parent namespaces have access, and subclasses in a different namespace (as they typically are). #1. Would be nice #2. Don't care for #4. Never needed direct access to all the classes in a namespace - always dealt with one or two classes or used fully-qualified names. #5. If that's what it took for IDE support, okay.
-
Avoid 'output Buffering' When Dealing With Remote Files?
requinix replied to Stooney's topic in PHP Coding Help
Do you have an example URL we can check? [edit] The script does need to flush() at a minimum. -
Actually that may not be valid JSON... There's empty array items in it. Where is this data coming from?
-
If the XML doesn't have the $xmlstring = file_get_contents("wherever"); $xml = new SimpleXMLElement("<?xml version='1.0' encoding='whatever encoding'?>\n{$xmlstring}", 0, false);