php-general Digest 28 May 2008 06:16:12 - Issue 5483
Topics (messages 274749 through 274757):
Re: Header Redirect
274749 by: Robert Cummings
274750 by: Stut
274752 by: Stut
looking a regular expresion
274751 by: Manuel Pérez López
Re: scanned in manipulate
php-general Digest 28 May 2008 18:27:21 - Issue 5484
Topics (messages 274758 through 274779):
Re: Restricting access to a file
274758 by: Adam Richardson
274765 by: Bastien Koert
Re: PEAR_Exception PEAR_Error
274759 by: Chris
274761 by: Richard Heyes
Hi Folks,
This may not be strictly a PHP question but there may be something in
PHP to do what I want. I am in the process of putting together a pretty
basic website using MySql and PHP on a third party host. One of the
function is to allow known stockist download a catalogue (.pdf). I am
I usually set up what amounts to a quick controller page. The page
accepts a GET variable that identifies the download, and it also
delegates to a helper object that determines the access level.
If the delegate determines that the person should be able to download/
view the content, the
Al wrote:
I'm using the pear class Mail_RFC822::parseAddressList() which
apparently only throws an error_object for PEAR_Error.
The manual says that PEAR_Error is deprecated, so I'd like to use
PEAR_Exception; but; am having trouble getting it to recognize the error.
Probably better to ask
2008/5/27 Manuel Pérez López [EMAIL PROTECTED]:
Hello:
I need to include a pair of negations with two complete word into a regular
expresion for preg_replace. How to do this?
I want to replace I want to be a SUN and a SIR with FRIKI FRIKI FRIKI
FRIKI FRIKI SUN FRIKI FRIKI SIR
ie. the words
Hi All,
I must be overlooking something here ...
$var1 = 01011090; $var2 = 010190; // 2 strings
if ($var1 $var2) ECHO var1 var2; else ECHO var1 = var2; echo br /;
$r = strcmp ( $var1 , $var2 );
if ($r 0) ECHO var1 var2, br /;
2nd line says: $var1 = $var2
4th line says: $var1 $var2
TIA,
2008/5/28 C.R.Vegelin [EMAIL PROTECTED]:
$var1 = 01011090; $var2 = 010190; // 2 strings
if ($var1 $var2) ECHO var1 var2; else ECHO var1 = var2; echo br
/;
$r = strcmp ( $var1 , $var2 );
if ($r 0) ECHO var1 var2, br /;
2nd line says: $var1 = $var2
4th line says: $var1 $var2
Implicit
I'm using the pear class Mail_RFC822::parseAddressList() which
apparently only throws an error_object for PEAR_Error.
You might want to consider the filter_var() function if you can - it
will be much faster.
The manual says that PEAR_Error is deprecated, so I'd like to use
PEAR_Exception;
- Original Message -
From: David Otton [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Wednesday, May 28, 2008 12:11 PM
Subject: Re: [PHP] strcmp($var1, $var2) versus if ($var1 $var2)
2008/5/28 C.R.Vegelin [EMAIL PROTECTED]:
On May 24, 2008, at 5:06 PM, Michelle Konzack wrote:
Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
On Wed, May 28, 2008 at 2:23 AM, Adam Richardson [EMAIL PROTECTED]
wrote:
I usually set up what amounts to a quick controller page. The page accepts
a GET variable that identifies the download, and it also delegates to a
helper object that determines the access level.
If the delegate
What a endless boring off topic thread...
I'm wondering if some day this one will finish and we will talk about
serious and relevant stuffs.
Some of you will tell me to simply don't read the thread... but what is
making me seek is the fact of this message always appear on top my email
list!
Ok,
On Tue, 2008-05-27 at 20:50 +0100, Stut wrote:
On 27 May 2008, at 19:18, Robert Cummings wrote:
On Tue, 2008-05-27 at 18:04 +0100, Stut wrote:
On 27 May 2008, at 17:54, Robert Cummings wrote:
On Tue, 2008-05-27 at 17:10 +0100, Stut wrote:
On 27 May 2008, at 17:06, Yui Hiroaki wrote:
I
Hi,
Apologies for posting this here but coudn't find a decent Smarty list.
I've been using Smarty for 4 years without much problem. I'm adding some
extra functionality to a page used by 2 members of staff. My snippets of
relevant code are:
$smarty-assign('clearance',
In which situation would somebody use a static method, instead of a
function in a namespace, after the namespaces arrive with 5.3?
Iv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
try doing this..
{if $clearance eq 0}
instead use ==
i saw that some version of smarty has a bug related to this issue
BTW .. you could use the options helper [1]
saludos
gabriel
[1] http://www.smarty.net/manual/en/language.function.html.options.php
On Wed, May 28, 2008 at 11:46 AM,
If the functionality doesn't conceptually promote the inclusion of the
variables it works on (i.e., no class variables), doesn't conceptually fit a
scheme where instances can exist, and likely won't benefit from refactoring
into component methods, then I could see using a namespaced function.
Most
Hi George,
I tried your code and it works.
If you have some way of remote assistance I can have a look on-site,
if you like.
But it could be that you just need a good sleep, and then look again ;)
Iv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Gabriel Sosa wrote:
try doing this..
{if $clearance eq 0}
instead use ==
i saw that some version of smarty has a bug related to this issue
BTW .. you could use the options helper [1]
saludos
gabriel
Right... I forgot to ask which Smarty version you have. I tried it with
the last.
Adam Richardson wrote:
If the functionality doesn't conceptually promote the inclusion of the
variables it works on (i.e., no class variables), doesn't conceptually
fit a scheme where instances can exist, and likely won't benefit from
refactoring into component methods, then I could see using
-Original Message-
From: Manuel Pérez López [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2008 2:06 PM
To: php-general@lists.php.net
Subject: [PHP] looking a regular expresion
Hello:
I need to include a pair of negations with two complete word into a
regular
expresion for
Iv,
Thanks, but its Firefox to blame. Apparently it holds previously stored values
in form fields. These are released when the user holds shift while reloading.
Cheers
George
| -Original Message-
| From: Iv Ray [mailto:[EMAIL PROTECTED]
| Sent: 28 May 2008 4:55 pm
| To: George Pitcher
filter_var() is an excellent suggestion and works great.
Richard Heyes wrote:
I'm using the pear class Mail_RFC822::parseAddressList() which
apparently only throws an error_object for PEAR_Error.
You might want to consider the filter_var() function if you can - it
will be much faster.
The
Hi all,
I've put this off as long as possible, however I think I've reached an
impasse.
I've got an application that I've been writing. One of the modules for
this app is an event calendar. I've got the calendar to the place where
it displays the current month as well as previous and future
On Wed, 2008-05-28 at 14:27 -0400, Mark Weaver wrote:
Hi all,
I've put this off as long as possible, however I think I've reached an
impasse.
I've got an application that I've been writing. One of the modules for
this app is an event calendar. I've got the calendar to the place where
-Original Message-
From: Manuel Pérez López [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2008 2:06 PM
To: php-general@lists.php.net
Subject: [PHP] looking a regular expresion
Hello:
I need to include a pair of negations with two complete word into a
regular
Robert Cummings wrote:
function getStamp($dateStr,$dayVal=1){
return date('U',mktime(0,0,0, $dateStr,$dayVal,date('Y')));
}
^
^
Mark Weaver wrote:
Hi all,
I've put this off as long as possible, however I think I've reached an
impasse.
I've got an application that I've been writing. One of the modules for
this app is an event calendar. I've got the calendar to the place where
it displays the current month as well as
Out of curiosity.. have you thought about reworking your premise? Using
prev, current, and next is extremely sloppy IMHO. Additionally, it
prevents bookmarking a specific calendar date. Why don't you have a date
parameter that indicates the year and month? If no such field exists
then you fallback
On Wed, 2008-05-28 at 16:47 -0400, Robert Cummings wrote:
Out of curiosity.. have you thought about reworking your premise? Using
prev, current, and next is extremely sloppy IMHO. Additionally, it
prevents bookmarking a specific calendar date. Why don't you have a date
parameter that
Robert Cummings wrote:
Out of curiosity.. have you thought about reworking your premise? Using
prev, current, and next is extremely sloppy IMHO. Additionally, it
prevents bookmarking a specific calendar date. Why don't you have a date
parameter that indicates the year and month? If no such field
Robert Cummings wrote:
On Wed, 2008-05-28 at 16:47 -0400, Robert Cummings wrote:
Out of curiosity.. have you thought about reworking your premise? Using
prev, current, and next is extremely sloppy IMHO. Additionally, it
prevents bookmarking a specific calendar date. Why don't you have a date
Hey all,
I have an HTML template file I read into a PHP
script and then after supplying dynamic data I
send the template to the browser with
echo $html;
The HTML template contains many JS files in the
head.../head section referenced like this:
script src=ajax/players.js
Hi,
In the following code, only the first row from query1 displays along with the
display stuff from query3. The problem: query1 refuses to recurse to the next
and following rows.
It appears that the sub-queries in the main query cause the $row++; not to
work.
Is there some conditional
Hey all,
I don't know if it's practical to change the name
of the file when they are updated, but another
thing I found along similar lines reading up on
this was something like this was:
ajax/players.js?version=21
Would that also do it?
Not sure what the server is sending for EXPIRES,
$numrows1 = pg_numrows($result1);
$row = 0;
do
{
$myrow = pg_fetch_array($result1, $row);
snip
$numrows2 = pg_numrows($result2);
Skip Evans wrote:
Hey all,
I don't know if it's practical to change the name of the file when they
are updated, but another thing I found along similar lines reading up on
this was something like this was:
ajax/players.js?version=21
Would that also do it?
Not sure what the server is
Chris wrote:
$numrows1 = pg_numrows($result1);
$row = 0;
do
{
$myrow = pg_fetch_array($result1, $row);
snip
$numrows2 = pg_numrows($result2);
Thanks Wolf and Chris,
That did the trick -- now I just have to clean up the order a bit.
Amazing how another's view can see the problem so clearly -- I was way too
close, what with otehr coding - should've seen it!
Regards,
Andre
(celtic)
On Wednesday 28 May 2008, Wolf wrote:
Chris wrote:
Skip Evans wrote:
Hey all,
I have an HTML template file I read into a PHP script and then after
supplying dynamic data I send the template to the browser with
echo $html;
The HTML template contains many JS files in the head.../head section
referenced like this:
script src=ajax/players.js
[EMAIL PROTECTED] wrote:
Hi,
In the following code, only the first row from query1 displays along with the
display stuff from query3. The problem: query1 refuses to recurse to the next
and following rows.
It appears that the sub-queries in the main query cause the $row++; not to
work.
Hi Jim,
Actually, after I got the code working, I eliminated the 'exit' and skipped
the empty query instead to the next block.
Ahh! That cryptic header relocate:
If the db conn or code is buggy fails, it redirects to a nice page telling the
user that the db 'Is down for maintenance' or
43 matches
Mail list logo