On Thu, Aug 16, 2007 at 09:50:30PM +0800, hshh wrote:
> I try to disable eval() function in php script, but
> failed. In php.ini disable_functions=eval is not work,
> but other functions.
> So, is it possible to disable eval()? Thanks.
It don't work because eval() isn't a function.
The Suhosin p
On Wed, Aug 08, 2007 at 11:39:20PM +0100, Joker7 wrote:
> Can anyone give me some pointer,here's my problem.I wish
> to move a file from a local server to a remote one.The file
> is in the format ([EMAIL PROTECTED]) on moving the
> file to the remote server I wish to remove the time stamp
> par
On Wed, Aug 01, 2007 at 08:05:09PM -0700, Jack Bates wrote:
> I'm not sure how to get an array of all subexpression matches, in the
> order matches appear in the subject, instead of the order expressions
> appear in the pattern.
This problem gave me a headache. My only idea is to use preg_split()
On Thu, Feb 22, 2007 at 01:40:53PM -, Ross wrote:
> I have my RG's switched off in my local .ini but I am tinkering about with
> oscommerce.
>
> php_value register_globals on
>
> I tried to change add this line to the .htaccess file in the catalog folder
> but still gives the error
>
>
>
It's 6.2 but PHP 4.4.4.
Basically, I'm not getting any error. The expression just don't match. I
don't know if it should or not.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Addendum: I encountered a problem when the string contains linebreaks. Maybe
adding \n\r into the brackets fixes your problem.
On Sat, Feb 17, 2007 at 09:27:59AM -0500, Beauford wrote:
> Hi,
>
> I previously had some issues with preg_match and many of you tried to help,
> but the same problem s
As far as I tested, the regular expression works how it is
intended to work.
Maybe this a touch easier to read line do it for you:
elseif (preg_match('|[EMAIL PROTECTED]&*();:_. /\t-]|', $comment))
On Sat, Feb 17, 2007 at 09:27:59AM -0500, Beauford wrote:
> Hi,
>
> I previously had some
By using something like
$var = preg_replace(
"!<(i|b|small|big|code)>(.+)\\1>!isU",
"<\\1>\\2", $var);
you can accomplish a solution where only closed tags
will be reconverted.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It's more secure to begin with converting the string using
htmlentities() and reconverting allowed tags afterwards.
See
http://alistapart.com/articles/secureyourcode
http://alistapart.com/articles/secureyourcode2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Side note:
$exp = explode('"', $var);
foreach ($exp as $key => $val) if ($key%2!=0) $arr[] = $val;
var_dump($arr);
works without regular expressions.
--
Steffen
On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote:
> Hi, i have a problem using regex, i want to get all the text b
I don't know, but http://php.net/manual/en/function.ereg.php says
"Note: preg_match(), which uses a Perl-compatible regular expression
syntax, is often a faster alternative to ereg()."
On Sat, Feb 03, 2007 at 01:58:50PM -0500, Manolet Gmail wrote:
> anyway, PCRE is better that ereg?
You have to use preg_match_all()
if (preg_match_all("!\"(.+)\"!sU", $var, $match))
On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote:
> Hi, i have a problem using regex, i want to get all the text between " "
>
> so i try this...
>
> $subject = 'menu "Archer?",-,"Chief?",L_Menu2,
On Fri, Feb 02, 2007 at 09:01:38PM +0100, Steffen Ebermann wrote:
>
> $new = preg_replace("!\|| !", "_", $old);
Heyha, the mail's subject gone obsolete. preg_replace isn't
necessary at all.
Better use: $new = str_replace(array ("|","
Maybe you just mistyped that, but this would *probably* also match on s=""
or bar="", cause [ and ] are metacharacters.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This always works for me:
if (preg_match_all("!\"(.+)\"!sU", $var, $match))
{
for ($i=0; $i Hi all,
>
> I want replace the "|" (pipe) and the " " (space) chars where are between "
> (double-quotes) by an underscore "_" with the preg_replace(); funtction.
>
> Can someone help me to find the c
15 matches
Mail list logo