On Thursday 16 November 2006 14:07, Chris Shiflett wrote:
> Larry Garfield wrote:
> > I've run into this sort of issue a few times before, and never
> > found a good solution.
>
> Not sure if this is the solution you're looking for, but you can convert
> them to regular quotes:
>
> http://shiflett.
R> you may want to look at the parse_url and explode functions.
Thanks, I'll look into that
R> you do realize that the referer, should it exist <...>
Good point, thanks for pointing that out. Yes, I was aware of that it
didn't come to mind. The security isn't so much an issue as that's already
I need to extract just the filename from the referring url, stripping it of
the path and any post vars on the end. there's got to be an easier way than
this eh?
$referrer = trim(strrchr(substr($_SERVER['HTTP_REFERER'],0,
strpos($_SERVER['HTTP_REFERER'],"?")), "/"), "/")
Thanks!
-JP
> I've run into this before, and if you use MySQL you can do something
> like this:
>
> SELECT SQL_CALC_FOUND_ROWS * FROM Products LIMIT $From, $To
>
> SELECT FOUND_ROWS()
>
> http://dev.mysql.com/doc/refman/5.0/en/information-functions.html
>
> The second query will give you the number of rows tha
I've run into this before, and if you use MySQL you can do something
like this:
SELECT SQL_CALC_FOUND_ROWS * FROM Products LIMIT $From, $To
SELECT FOUND_ROWS()
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html
The second query will give you the number of rows that would have bee
> [EMAIL PROTECTED] wrote:
>> hi,
>> I have query to select products for specific category from DB, something
>> like:
>> SELECT prod_id, prod_name,...
>> FROM products
>> LIMIT $From, $To
>>
>> where $From and $To values depend of on what page you are. let say there
>> are 100 products and I'm lis
[EMAIL PROTECTED] wrote:
hi,
I have query to select products for specific category from DB, something
like:
SELECT prod_id, prod_name,...
FROM products
LIMIT $From, $To
where $From and $To values depend of on what page you are. let say there
are 100 products and I'm listing 25 products per page.
hi,
I have query to select products for specific category from DB, something
like:
SELECT prod_id, prod_name,...
FROM products
LIMIT $From, $To
where $From and $To values depend of on what page you are. let say there
are 100 products and I'm listing 25 products per page. for page 1 $From=0,
$To=24
On 11/17/06, Børge Holen <[EMAIL PROTECTED]> wrote:
I've figured out I need the substr_count function.
However, counting strings like this: [1] [2] [3] ... [215] ...
inside a large string element. damn.
The string got quite a few different numbers and keys but the main key is
alway within [] and
On 11/17/06, Stein Ivar Johnsen <[EMAIL PROTECTED]> wrote:
Sorry, I have no access to my ISP's php.ini file. I need to turn off
warnings in the php script code?
--
Regards
sijo
http://www.dyg.no
"clive" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> Stein Ivar Johnsen wrote:
>>
I've figured out I need the substr_count function.
However, counting strings like this: [1] [2] [3] ... [215] ...
inside a large string element. damn.
The string got quite a few different numbers and keys but the main key is
alway within [] and is numeric.
I imagine I could use a $counter++.
I j
On 17 November 2006 16:50, Stut wrote:
> > > Your basic misunderstanding is that === is the opposite of !==
> > > which it's not.
Complete rubbish -- it so absolutely is!
If $a===$b, then !($a===$b) is the same as $a!==$b, QED.
> > >(INTEGER === true) will always be false because the type
Jochem Maas wrote:
$file = $array[0][file];
$path = $array[0][path];
$year = $array[0][year];
$month = $array[0][month];
$day = $array[0][day];
$hhmm = $array[0][hhmm];
where the are your quotes for the array keys? have an E_NOTICE or six.
I was typing fast and
Ok, just to shut you all up, I managed to convince the OP earlier today,
but it never made it to the list...
Michael wrote:
At 02:58 AM 11/17/2006 , Stut wrote:
Michael wrote:
This will be my last post on this thread of discussion.
Thanks to all who replied, I have it figured out.
I
At 2:54 AM -0700 11/17/06, Michael wrote:
Logic dictates that if something evaluates to NOT FALSE it must be TRUE.
Regardless of the type, regardless of the species, breed, flavor etc.
Not true -- it depends upon your reference/environment.
For example, NULL is neither true nor false in MySQL.
Robert Cummings wrote:
> On Fri, 2006-11-17 at 17:29 +0100, Jochem Maas wrote:
>> Robert Cummings wrote:
>>> On Fri, 2006-11-17 at 02:54 -0700, Michael wrote:
This will be my last post on this thread of discussion.
Thanks to all who replied, I have it figured out.
I guess m
Ashley M. Kirchner wrote:
>
>I have an array that looks like this:
>
>[hours] => Array
>(
>[0] => Array
>(
>[file] => capture.0400.jpg
>[path] => spool/.2006/11/17/04
>[year] => 2006
>
On Fri, 2006-11-17 at 17:29 +0100, Jochem Maas wrote:
> Robert Cummings wrote:
> > On Fri, 2006-11-17 at 02:54 -0700, Michael wrote:
> >> This will be my last post on this thread of discussion.
> >>
> >> Thanks to all who replied, I have it figured out.
> >>
> >> I guess my only problem with the wa
On Fri, 2006-11-17 at 09:23 -0700, Ashley M. Kirchner wrote:
> I have an array that looks like this:
>
> [hours] => Array
> (
> [0] => Array
> (
> [file] => capture.0400.jpg
> [path] => spool/.2006/11/17/04
>
Robert Cummings wrote:
> On Fri, 2006-11-17 at 02:54 -0700, Michael wrote:
>> This will be my last post on this thread of discussion.
>>
>> Thanks to all who replied, I have it figured out.
>>
>> I guess my only problem with the way the !== and === operators work in this
>> situation is this:
>>
>
Is there a way that I can simply loop through each array and convert
the keys into variables? I want to avoid having to write lines of:
Look into extract().
http://us3.php.net/manual/en/function.extract.php
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
I have an array that looks like this:
[hours] => Array
(
[0] => Array
(
[file] => capture.0400.jpg
[path] => spool/.2006/11/17/04
[year] => 2006
[month] => 11
[da
On Fri, 2006-11-17 at 02:54 -0700, Michael wrote:
> This will be my last post on this thread of discussion.
>
> Thanks to all who replied, I have it figured out.
>
> I guess my only problem with the way the !== and === operators work in this
> situation is this:
>
> Logic dictates that if somet
> > Logic dictates that if something evaluates to NOT FALSE it
> > must be TRUE.
In a situation where you are only dealing with boolean values, that above
statement would be correct. In this case it is not.
int stripos ( string haystack, string needle [, int offset] )
What you are missi
Stut wrote:
> Tom Chubb wrote:
>> The host support team told me that:
>> Our servers do not allows a HTTP connection onto itself. This is a
>> security precaution to stop recursive code.
morons
';
teachTheIdiotSysAdmin();
}
?>
>> You can try to reference
>> the code by path rather
Tom Chubb wrote:
The host support team told me that:
Our servers do not allows a HTTP connection onto itself. This is a
security precaution to stop recursive code. You can try to reference
the code by path rather than HTTP
...which works fine!
Won't something like this work...
ob_start();
// I
The host support team told me that:
Our servers do not allows a HTTP connection onto itself. This is a
security precaution to stop recursive code. You can try to reference
the code by path rather than HTTP
...which works fine!
On 17/11/06, Tom Chubb <[EMAIL PROTECTED]> wrote:
Very interesting!
On 17 November 2006 09:55, Michael wrote:
> This will be my last post on this thread of discussion.
>
> Thanks to all who replied, I have it figured out.
>
> I guess my only problem with the way the !== and ===
> operators work in this situation is this:
>
> Logic dictates that if something eva
Very interesting!
I have a reseller account and on another site, the DNS entries were
messed up by the host. Could be a similar problem.
Thanks
On 17/11/06, Stut <[EMAIL PROTECTED]> wrote:
Tom Chubb wrote:
> Confused!
> I'm now getting:
> file_get_contents(http://www.tnhosting.co.uk/scripts/gclu
Frank Arensmeier wrote:
> Hello all.
>
> I am looking for some ideas on how to design / structure a script which
> checks for updates on files on a existing CD ROM.
>
> Every week, I generate content for a CD ROM containing a large number of
> html pages and PDF files (the CD is distributed to 20
On 17/11/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
Tom Chubb wrote:
> Confused!
> I'm now getting:
> file_get_contents(http://www.tnhosting.co.uk/scripts/gclub/player.php)
> [function.file-get-contents]: failed to open stream: Connection
> refused in
> /home/sites/tnhosting.co.uk/public_html/scr
George Pitcher wrote:
I am using PHP5.1 with Smarty templates on my page (but not on the
standalone page).
Smarty doesn't offer anything other than the sprintf() options for string
formatting of decimal numbers, and I'm already doing that.
Do you think Smarty could be so unsmart as to undo the
Tom Chubb wrote:
Confused!
I'm now getting:
file_get_contents(http://www.tnhosting.co.uk/scripts/gclub/player.php)
[function.file-get-contents]: failed to open stream: Connection
refused in
/home/sites/tnhosting.co.uk/public_html/scripts/gclub/updateplaylist.php
on line 75
How come you can acce
Tom Chubb wrote:
> Confused!
> I'm now getting:
> file_get_contents(http://www.tnhosting.co.uk/scripts/gclub/player.php)
> [function.file-get-contents]: failed to open stream: Connection
> refused in
> /home/sites/tnhosting.co.uk/public_html/scripts/gclub/updateplaylist.php
> on line 75
> How come
> George Pitcher wrote:
> >> Are you sure the web service is giving you 160.44? I get it
> displayed as
> >> expected...
> >>
> >> http://dev.stut.net/php/pitcher.php
> >>
> > Yes, I am echoing the 160.44 ok. I'm just not getting the 44c
> in my display
> > price. I'm on Windows NT - could that
This one time, at band camp, "Stein Ivar Johnsen" <[EMAIL PROTECTED]> wrote:
> Hi..
>
> How can I hide Warning messages so they are not shown on screen..:
code properly...
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vot
Stein Ivar Johnsen wrote:
I have tried "error_reporting(0);" but this does not help. The program is
still writing warnings to screen.
My ISP is using PHP Version 4.3.10 if that is any help.
I have no access to the PHP.INI file.
Any more ideas, please?
fix the code thats generating the errors?
> George Pitcher wrote:
> > As part of a result from a web-service call, I get a price in
> dollars and
> > cents as a decimal number eg.160.44 (the example I am working on. This
> > price is for permission to re-use some published material and for each
> > additional separate pagerange, $3 needs
George Pitcher wrote:
Are you sure the web service is giving you 160.44? I get it displayed as
expected...
http://dev.stut.net/php/pitcher.php
Yes, I am echoing the 160.44 ok. I'm just not getting the 44c in my display
price. I'm on Windows NT - could that be a factor?
I'm not sure w
George Pitcher wrote:
As part of a result from a web-service call, I get a price in dollars and
cents as a decimal number eg.160.44 (the example I am working on. This
price is for permission to re-use some published material and for each
additional separate pagerange, $3 needs to be added afterw
Sorry, I have no access to my ISP's php.ini file. I need to turn off
warnings in the php script code?
--
Regards
sijo
http://www.dyg.no
"clive" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> Stein Ivar Johnsen wrote:
>> Hi..
>>
>> How can I hide Warning messages so they are not
I have tried "error_reporting(0);" but this does not help. The program is
still writing warnings to screen.
My ISP is using PHP Version 4.3.10 if that is any help.
I have no access to the PHP.INI file.
Any more ideas, please?
--
Regards
sijo
http://www.dyg.no
""Tom Chubb"" <[EMAIL PROTECTED]>
Hi,
As part of a result from a web-service call, I get a price in dollars and
cents as a decimal number eg.160.44 (the example I am working on. This
price is for permission to re-use some published material and for each
additional separate pagerange, $3 needs to be added afterwards.
So I have th
This will be my last post on this thread of discussion.
Thanks to all who replied, I have it figured out.
I guess my only problem with the way the !== and === operators work in this
situation is this:
Logic dictates that if something evaluates to NOT FALSE it must be TRUE.
Regardless of the typ
Stein Ivar Johnsen wrote:
Hi..
How can I hide Warning messages so they are not shown on screen..:
look in your php.ini file and set error_reporting to an appropriate value
or
set display_errors to off
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
Choose one of the following, but if you are getting warnings,
something is wrong and you should address it.
On 16/11/06, Stein Ivar Johnsen <[EMAIL PROTECTED]> wrote:
Hi..
How can I hide Warning messages so they are not shown on screen..:
Warning: Call-time pass-by-reference has been deprecat
Michael wrote:
I understand that the integer 0 and FALSE are different and I read the manual
so many times my head hurts, heh.
There are a few ways to work around this, probably more than I know. (according to the
documentation for strrpos() you could test the return from stripos() for is_bool
Please include the list in replies.
Michael wrote:
Why can't === realize that integer 0 means TRUE? whereas "" or a BOOLEAN false
does not? === evaluates integer 0 to FALSE :(
the !== operator recognizes the difference.
"(integer) 0 !== FALSE" is TRUE yet
"(integer) 0 === TRUE" is FALSE, bu
At 02:33 AM 11/17/2006 , Stut wrote:
>Michael wrote:
>> I understand that the integer 0 and FALSE are different and I read the
>> manual so many times my head hurts, heh.
>>
>> There are a few ways to work around this, probably more than I know.
>> (according to the documentation for strrpos() yo
Hi..
How can I hide Warning messages so they are not shown on screen..:
Warning: Call-time pass-by-reference has been deprecated - argument passed
by value; If you would like to pass it by reference, modify the declaration
of [runtime function name](). If you would like to enable call-time
pass
At 02:10 AM 11/17/2006 , Stut wrote:
>Michael wrote:
>> Ok, picking gnits...
>> I should have said NOT true and NOT false at the same time.
>> As for the return of the integer 0..
>> The documentation indicates that the === and !== operators take this into
>> account in fact there is a specific ex
Hello all.
I am looking for some ideas on how to design / structure a script
which checks for updates on files on a existing CD ROM.
Every week, I generate content for a CD ROM containing a large number
of html pages and PDF files (the CD is distributed to 20 - 30 dealers
for ours) . The
Michael wrote:
I'm not sure why the === operator does not handle this condition, since the
wonderful people at PHP foresaw the problem and fixed !== to handle it, I would
like to see the === fixed to handle this as well (if it is even possible, not
sure about how this is implemented??)
Th
Michael wrote:
Ok, picking gnits...
I should have said NOT true and NOT false at the same time.
As for the return of the integer 0..
The documentation indicates that the === and !== operators take this into
account in fact there is a specific example in the manual.
My point here is that if !==
At 12:24 AM 11/17/2006 , Michael wrote:
>HEllo all,
>
>After pulling my hair out for several hours trying to figure out why my code
>wasn't working I built this little test and ran it, the results are interesting
>in the least, and to me, surprising. It is possible that I have done something
>wrong
On 17/11/06, Paul Novitski <[EMAIL PROTECTED]> wrote:
At 11/16/2006 03:19 PM, Dotan Cohen wrote:
>However, this function:
>$text=preg_replace_callback('/\[([A-Za-z0-9\|\'.-:underscore:]+)\]/i'
>, "findLinks", $text);
>Does what I want it to when there is no space, regardless of whether
>or not th
56 matches
Mail list logo