I don't know how to use the POSIX classes, but if you use preg_replace:
preg_replace("/[^$params]/", '', $string);
I think this will work.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Alberto García Gómez wrote:
> Fellows:
>
> If I use ereg_replace($param
VamVan wrote:
Hello All,
Does any body create installable RPM's for reinstalling their PHP based
websites? Is it possible
If yes could you please share your experience. Oh yes you could tar it but
that's a primitive method.
My quest is to make all my websites installable on any given s
Is it possible to grab a variable number of parameters and send the
appropriate amount to another function?
db->prepare("SELECT * FROM `table` WHERE (`id`=?)");
$this->db->bind('ii', $id1);
$this->db->prepare("SELECT * FROM `table` WHERE (`id`=? AND
`other_id`=?)");
$this->db->bind('ii', $i
Fellows:
If I use ereg_replace($params, $string) I can replace the char that match
with $params in the $string.
BUT, how I can replace ALL chars EXCEPT the chars in $params.
Something like !$params, I think
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
I'm building a multi-database system, although my main targets are MySQL,
Postgres, and SQLite.
How would those handle something like "a string that ends in 100%"?
On Monday 04 August 2008 6:18:24 pm Asher Snyder wrote:
> Depending on what database you're using you might be able to use LIKE
>
Thanks everyone. I looked into the Firefox browser forums/support and
found that the "Right-Click >> Save Link As" does not send the header
response, as it will take the file as-is. So in this example, it sees
the 'download.php' and then takes that as the default name. It then
starts the download o
1. To get last months date, you can use strtotime("1 month ago")
instead of mktime.
2. I don't see anywhere in the code where you are limiting by date.
Try using > and <. Between is tricky on dates.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Vinny Gu
So I have this code I'm working with (pasted below) that queries a mysql db
table called timetracking. The goal of the page is to search the db for all
data based on a certain engineer, sorted by product and it takes pre-defined
values based on actions performed, sums them based on product and d
Depending on what database you're using you might be able to use LIKE
while maintaining security. For instance PostgreSQL has the functions
quote_ident(), and quote_literal() which would allow you to use LIKE
since these functions would automatically make the string suitable for
comparison.
Like I said, I'm not 'especially pleased' with any idea up until now. I'm
certainly open to any other ideas.
Adam
On Mon, Aug 4, 2008 at 6:57 PM, Larry Garfield <[EMAIL PROTECTED]>wrote:
>
> Hm. So your solution is "don't use LIKE"? I can't say I'm wild about
> that. :-/
>
> --Larry Garfield
Hm. So your solution is "don't use LIKE"? I can't say I'm wild about that. :-/
--Larry Garfield
On Mon, 4 Aug 2008 15:49:52 -0400, "Adam Richardson" <[EMAIL PROTECTED]> wrote:
> Larry,
>
> I agree that having to escape values in a stored procedure does run
> counter
> to expectations. It's l
>
> Waynn Lue wrote:
>
>> I've been running the script below:
>>
>> > $appIds = getLotsOfAppIds();
>> foreach ($appIds as $appId) {
>>echo "$appId\n";
>>//echo memory_get_usage() . "\n";
>>try {
>> $getBundles = getBundles($appId);
>> $numBundles = count($registeredBundles);
Larry,
I agree that having to escape values in a stored procedure does run counter
to expectations. It's likely other developers have the potential for
short-circuiting their LIKE conditions without realizing it.
I've dealt with this issue, too, and haven't been especially pleased with
any of th
> -Original Message-
> From: Andrew Ballard [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 04, 2008 10:49 AM
> To: PHP General list
> Subject: Re: [PHP] PDO prepared statements and LIKE escaping
>
> On Mon, Aug 4, 2008 at 11:35 AM, Larry Garfield
> <[EMAIL PROTECTED]> wrote:
> >
> > On M
Yeah, back from January. They stopping shipping APC in the PHP
downloads (specifically the PECL download for Windows). And since
pecl4win.php.net does NOT have the nts versions, it is pretty useless.
On Sat, Jul 26, 2008 at 12:22 AM, T Lensselink <[EMAIL PROTECTED]> wrote:
> steve wrote:
>> Since
Boyd, Todd M. wrote:
-Original Message-
From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2008 10:33 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Not found regex
Manoj Singh wrote:
Hi All,
Thanks for your replies.
Actually i am placing this regex in .htacce
> -Original Message-
> From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 04, 2008 10:33 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Not found regex
>
> Manoj Singh wrote:
> > Hi All,
> > Thanks for your replies.
> >
> > Actually i am placing this regex in .h
Alain Roger wrote:
> Hi,
>
> i'm currently analyzing an e-shop system.
> i understand how to display products and so on, however i still have some
> question marks on the following topics:
>
> 1. what is the best way for showing product image ?
> - to store them in DB or onto filesystem as simple
On Mon, Aug 4, 2008 at 12:55 AM, Catalin Zamfir Alexandru | KIT
Software CAZ <[EMAIL PROTECTED]> wrote:
> What are you talking about? I've been able to upload a 4GB file without
> problem. Uploading doesn't depend on memory limit, and this has been a
> subject of debate on the PHP.net Manual (upl
On Mon, 4 Aug 2008 11:48:39 -0400, "Andrew Ballard" <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 4, 2008 at 11:35 AM, Larry Garfield <[EMAIL PROTECTED]>
> wrote:
>>
>> On Mon, 04 Aug 2008 08:33:44 +0200, Per Jessen <[EMAIL PROTECTED]> wrote:
>>> Larry Garfield wrote:
>>>
IIRC, the way in SQL to c
Richard Kurth wrote:
> I have been trying to get this mail script to send an html message and
> it just sends the html in plain text with all the html code showing.
> Could somebody tell my way this will not work. When it does send it
> takes a long time to go through but when I send a plan text m
On Mon, Aug 4, 2008 at 11:35 AM, Larry Garfield <[EMAIL PROTECTED]> wrote:
>
> On Mon, 04 Aug 2008 08:33:44 +0200, Per Jessen <[EMAIL PROTECTED]> wrote:
>> Larry Garfield wrote:
>>
>>> IIRC, the way in SQL to circumvent that is to convert "100%" into
>>> "100%%". However, that does rather defeat th
Larry Garfield wrote:
> Actually in most cases in PHP you don't get much performance.
Exactly.
> What you do get is added security, because prepared statements are
> cleaner than cleaner and more reliable than string escaping. Of
> course, then we run into the % problem above.
I don't really
I have been trying to get this mail script to send an html message and
it just sends the html in plain text with all the html code showing.
Could somebody tell my way this will not work. When it does send it
takes a long time to go through but when I send a plan text message it
goes through right
On Mon, 04 Aug 2008 08:33:44 +0200, Per Jessen <[EMAIL PROTECTED]> wrote:
> Larry Garfield wrote:
>
>> IIRC, the way in SQL to circumvent that is to convert "100%" into
>> "100%%". However, that does rather defeat the purpose of a prepared
>> statement if I have to do my own escaping anyway, does
Manoj Singh wrote:
Hi All,
Thanks for your replies.
Actually i am placing this regex in .htaccess file.
Here i have to redirect all the request to https if it is not for ogg file.
The complete code is:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^.+\.ogg$ //Need some tweaking here. I kn
Hi All,
Thanks for your replies.
Actually i am placing this regex in .htaccess file.
Here i have to redirect all the request to https if it is not for ogg file.
The complete code is:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^.+\.ogg$ //Need some tweaking here. I know this
code works ju
On Mon, Aug 4, 2008 at 4:44 PM, Manoj Singh <[EMAIL PROTECTED]> wrote:
> Hello All,
> I have to create the regular expression to allow all the file extensions
> except the specified extension.
>
> Suppose I want to allow extensions with php, so the regex is: ^.+\.php$
>
> But here i need the regex
From: Manoj Singh [EMAIL PROTECTED]
Sent: Monday, August 04, 2008 10:44 AM
To: php-general@lists.php.net
Subject: [PHP] Not found regex
Hello All,
I have to create the regular expression to allow all the file extensions
except the specified extension.
Suppose I want to allow exte
Hello All,
I have to create the regular expression to allow all the file extensions
except the specified extension.
Suppose I want to allow extensions with php, so the regex is: ^.+\.php$
But here i need the regex which allows all the extensions except php.
I will appreciate any help.
Best Reg
Marten Lehmann wrote:
Hello,
I'm calling a webservice that is described by a WSDL-URL using the
PHP-builtin Soap client. This works fine in general. But although the
response is received correct, the variable type is wrong.
According to the WSDL file, the response is defined like this:
Hello,
I'm calling a webservice that is described by a WSDL-URL using the
PHP-builtin Soap client. This works fine in general. But although the
response is received correct, the variable type is wrong.
According to the WSDL file, the response is defined like this:
type="s:bool
On Aug 4, 2008, at 7:54 AM, Don Don wrote:
Hi All,
I've been reading on the internet that is most secure to store your
database details outside of the public accessible folder.
I am a bit stuck on how to do this.
I've got a folder "db_details" that contains the file "dbdetails"
which co
Hi All,
I've been reading on the internet that is most secure to store your database
details outside of the public accessible folder.
I am a bit stuck on how to do this.
I've got a folder "db_details" that contains the file "dbdetails" which
contains the database login info. I normally includ
Ethan Whitt wrote:
PHP newbie coming over from Perl. Been trying to convert some of my Perl
scripts over to PHP5. I am making a request to Amazon and receiving the
following response. How can I jump down to the element and loop
through all the ones that exist. I have been trying to do this w
PHP newbie coming over from Perl. Been trying to convert some of my Perl
scripts over to PHP5. I am making a request to Amazon and receiving the
following response. How can I jump down to the element and loop
through all the ones that exist. I have been trying to do this with XML
Simple, but w
2008/8/4 Will <[EMAIL PROTECTED]>:
> I am trying to have users download a file named 'Setup.msi', however
> under a PHP file with the sent header information, the default name to
> $forcename = "ApplicationSetup_v1_0.msi";
> $filename = "Setup.msi";
>
> header("Content-Type: application/force-dow
On 8/3/08, Will <[EMAIL PROTECTED]> wrote:
> @readfile($filename);
You should look into a webserver and instead of using readfile() which
will keep the PHP engine open while it is spoonfeeding the browser,
offload the file to the webserver.
nginx has X-Accel-Redirect (nginx is the best anyway)
L
On 8/3/08, Catalin Zamfir Alexandru | KIT Software CAZ
<[EMAIL PROTECTED]> wrote:
> What are you talking about? I've been able to upload a 4GB file without
> problem. Uploading doesn't depend on memory limit, and this has been a
> subject of debate on the PHP.net Manual (uploading files section,
39 matches
Mail list logo