Hi Matthew,
you might have magic quotes enabled in your PHP installation. Have a look at
http://php.net/manual/de/security.magicquotes.php about that topic.
If you want to unescape the string, use the stripslashes-function
(http://php.net/stripslashes).
Greetings from Germany
Marc
Matthew
Hey Ben,
to replace everything thats not alphanumeric, use the following statement:
$output = preg_replace('/[^[:alnum:]]/', '', $input);
Greetings from Germany
Marc
PS: Spaces are not alphanumeric ;)
Ben Miller wrote:
Oh yeah - not sure if spaces are considered alphanumeric or not, but I
Have a look at APC. APC is a bytecode cache, that stores bytecode generated of your PHP scripts, so
that your PHP code don't need be parsed every time the script is invoked.
http://pecl.php.net/package/apc
I was able to increase the performance of my PHP scripts dramatically.
Greetings from Ge
I guess you mean GET parameters instead of POST.
$string = preg_replace('/^(.*?)&id=/', '&id=', $_SERVER['QUERY_STRING']);
Don't know, if that's exactly what you wanted.
Greetings from Germany
Marc
Grega Leskovsek wrote:
I have a POST string field and I want to skip some & fields before &id
Maybe your code overwrites the variable anywhere?
You should think about switching to a constant in that case by using
define('TEST_MODE', true);
[...]
if (TEST_MODE) {
[...]
} else {
[...]
}
Greetings from Germany
Marc
Joey wrote:
Hello All,
I am running into a problem after I moved a s
Andrew Hucks wrote:
If I have something like $string = '"hello" there'; (the word hello is
in double quotes, if you can't see it), how would I output it as
something like "hello" there.
Try
$string = preg_replace('/"(.*?)"/',
Have a look at example #5 on
http://de3.php.net/manual/en/language.oop5.reflection.php#language.oop5.reflection.reflectionmethod
Greetings from Germany
Marc
Pulni4kiya wrote:
Hi, everyone!
I need to do the following:
Let's say I have this class:
class A {
public function b(array $c, $d =
Basically try-catch gives you the ability to handle errors outside a class or method scope, by the
calling instance.
This comes in handy, if you are programming in an object orientated way and thus enables you to
seperate error handling from the rest of your functionality.
Means, your methods do
Marc Steinert wrote:
Terion Miller wrote:
$query .= " WHERE stamp < NOW()-7 "; I have no clue here on this
Try
$query .= " WHERE stamp < SUBDATE(NOW(), INTERVAL -7 DAY)";
instead.
Marc
Damn, hit the send-button too fast. Replace -7 with 7. Sry for sp
Terion Miller wrote:
$query .= " WHERE stamp < NOW()-7 "; I have no clue here on this
Try
$query .= " WHERE stamp < SUBDATE(NOW(), INTERVAL -7 DAY)";
instead.
Marc
--
http://bithub.net/
Synchronize and share your files over the web for free
My Twitter feed
http://twitter.com/MarcS
Jason Pruim schrieb:
Now, on that site I have a few links... right now the likes are in the
format of:
HTTP://purl.raoset.com/design.php?purl=test112
What I would like is to have it read:
HTTP://purl.raoset.com/test112/design
Try the following rule (dunno, if it works for you, but you should g
Brian Dunning schrieb:
I have one server that's pretty busy and runs into "Too many
connections" from MySQL from time to time, and needs to have MySQL
restarted to clear it up.
I've tried everything I can think of to have PHP take note of this
error but continue executing with other stuff, bu
Merlin Morgenstern schrieb:
Hello everybody,
I am running a real estate site where I would like to enable bulk
upload via real estate software that exports an xml file into an ftp
account.
In order to give every user unique access I would need to generate
individual ftp name and passwords f
German Geek schrieb:
Why is the first method faster and uses less memory?
Because the concatenation operator first reassembles a new string,
stores it in memory then passes this newly created string to the echo
function, if I'm not misstaken.
--
http://bithub.net/
Synchronize and share yo
MikeP schrieb:
I have tried putting the quotes all over and all I get is:
'Array[U]'.
Try to avoid accessing the two-dimensional array $users inside a string.
Use echo's ability to accept multiple parameters:
echo '', $users[$x]['U'], '';
Or by concating the string with the .-Operator:
Anwarulhaq wrote:
I am working on MS.net.But now i days i want to work on PHP. I dont know the
basis of PHP. Can any one guide me how i have to start with PHP and which
editor i should use. Also the links of useful sites for help in PHP. I shall
be thankful.
Since you've allready worked with .
16 matches
Mail list logo