-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Execution order - incorrectly - Should be simple?!
requinix replied to loren646's topic in PHP Coding Help
echo ""; -
By the way: PHP will send a 200 OK by default so you don't actually have to specify that. Also by the way: when posting PHP code please use or [code=php:0] tags. [[ic][/ic]quote]s pale in comparison. It looks like sending a 404 at that point is the right behavior. Search engines really shouldn't be indexing empty/non-existant pages. Google is telling you that there are 404s not because you have them but because there are links going to them. Those links (if they're on your site) are what you need to fix - not the code.
-
Keep in mind that you can't do exactly as you've posted: where is the 123 (for the aid) coming from? All you have to work with is the requested URL. However rewriting from /members/1/posts/123-title-of-current-page/ is an option, and so is rewriting to /members/1/posts/page.php?atitle=title-of-current-page
-
How to only open connection to Slave from specified time
requinix replied to jeger003's topic in MySQL Help
It doesn't slow anything down. The slave waits and waits and waits until the master sends information. Meanwhile the process just sleeps, consuming no resources. -
Look in $_SERVER for something like the REQUEST_URI but that doesn't contain the query string. For the query string, $get = $_GET; if (isset($get["utm_source"])) unset($get["utm_source"]); // etc if ($get) $url .= "?" . http_build_query($get);
-
How to only open connection to Slave from specified time
requinix replied to jeger003's topic in MySQL Help
You do have a technical reason why you don't want the connection, or just "don't like it"? If the latter then I'm going to try to convince you that it's not a problem and you should just leave it be. -
1. Why do you even need to put the previous page in the URL? It's actually a bad thing. And you can get it more reliably (not perfectly) from the HTTP_REFERER anyways. 2. Shallower folder structures are better, but really the URL doesn't matter a whole lot. SEOing your URLs will not give you much of a boost in rankings. Helps, yes, but it's not some magic bullet.
-
What result are you looking for? Uneven arrays means there's no obvious answer to how to "save both values at once".
-
It's probably for the better. The v0.8 file has the offending function /** * Sets the path for a domain. */ function _bindtextdomain($domain, $path) { global $text_domains; // ensure $path ends with a slash if ($path[strlen($path) - 1] != '/') $path .= '/'; elseif ($path[strlen($path) - 1] != '\\') $path .= '\\'; $text_domains[$domain]->path = $path; } but the same problem shows up in other functions too. It seems like it's just bad coding at fault and fixing that could be a bother.
- 4 replies
-
- php
- imageboard
-
(and 1 more)
Tagged with:
-
That will happen if $text_domains[$domain] is not set or is null. Looking at trunk I don't see that code. Where did you get yours from?
- 4 replies
-
- php
- imageboard
-
(and 1 more)
Tagged with:
-
I can't tell you if you have to because I don't know what your site is, but I can say that without the leading slash the browser will think the link is relative to the current "directory". Meaning if /folder/file.html links to "profile.php" then it will try to go to /folder/profile.php.
-
Function eregi() is deprecated other error...
requinix replied to ncurran217's topic in PHP Coding Help
That expression is crazy too. /^[[:alnum:]~!@#$%^&*()\-+`_={}\[\]|:<>.,?]+$/ Also, why the heck do you want to validate the password? You're just going to hash/encrypt it anyways, right? -
How to only open connection to Slave from specified time
requinix replied to jeger003's topic in MySQL Help
What are you talking about? Replication? Persistent connection for something? -
Why do you say that? Are you getting any error messages? If not then make sure your php.ini has display_errors = on error_reporting = -1 (restart the server if you have to change it), and try again.
-
Function eregi() is deprecated other error...
requinix replied to ncurran217's topic in PHP Coding Help
PCRE (preg_* functions) expressions require delimiters around the expression while POSIX (ereg* functions) do not. It's complaining that you haven't added delimiters. The expression needs fixing anyways: it allows stuff I'm sure you don't want, like "9999||||9999||||9999". #^(\d?\d)[-/.](\d?\d)[-/.](\d\d(?:\d\d)?)$# -
You're kidding, right? Microsoft stopped supporting Windows 95 more than a decade ago. Anyways I Googled it.
-
Read the description very carefully. "This" was the PHPFreaks.com Questions, Comments, & Suggestions forum where you originally posted your thread. You were not asking a question, adding a comment, or making a suggestion about phpfreaks.com. You posted a topic asking for help not related to the website. So now your thread is here in PHP Coding Help, where people ask for help coding in PHP.
-
Then you must have a lot of code you can show us. Feel free to post as many of them as you want.
-
The question mark in the URL means something completely different than the question mark in the RewriteRule. The page you're testing now is the same page as test.com/index.php?home. Try going to test.com/?movies.
-
Depending on a few things mod_rewrite may think the URL starts with a slash or not. Using ^/? is a good way to make sure that the rule works in both cases.
-
What does your modified version look like? It's probably just one or two small fixes away from working.
-
What's wrong is you haven't told us the problem or what we should be looking for.
-
Whatever you do, the most important thing is being consistent. Someone can learn a crazy naming scheme (please don't use one) but it doesn't matter if you're inconsistent with it.
-
3.3m USD to build a website: what are your thoughts?
requinix replied to peppericious's topic in Miscellaneous
$3.3M over a year (which is how long it took, as far as I can find) at about $60/person/hour average over 45 weeks (40 hours/week) turns out to be about 30 people. At an average of $70/person/hour is 25 people. [edit] Someone in England can probably give more accurate wage figures. -
Given the word "asswipe" you can do a replace with regular expressions. $input = "Bob is such an aasssswwiipee"; $word = "asswipe"; $matchword = implode("+", array_map("preg_quote", str_split($word))) . "+"; // a+s+s+w+i+p+e+ $output = preg_replace_callback('/\b' . $matchword . '\b/i', function($matches) { return $matches[0][0] . (strlen($matches[0]) > 1 ? str_repeat("*", strlen($matches[0]) - 1) : ""); }, $input);