I see...
I will need this too:
ignore_user_abort(true);
kranthi napsal(a):
i dont think flock will help in this case..
flock will b of help when u want to lock a particular file(to
read/write) but it'll not help u to stop execution of a php script
--
PHP General Mailing List (http://www.
Martin Zvarík napsal(a):
I have 10 images of different sizes.
If user clicks ROTATE, a script will go through all these 10 images and
rotates them.
If the user clicks TWICE, the first script will get aborted in the
middle (so few images are already rotated) and then the second request
will
ords and dies half way thru the 3rd?
Thanks in advance for clues to fix this.
T.Miller
Should be:
--
$sql = ...
$query = mysql_query($sql) or die(...
while ($r = mysql_fetch_array($query)) {
--
Notice that you need to assign the mysql_query to a $query variable!
If
p, or do you get an error message?
Depending on how long it's taking to perform the action, the script
will stop just because it's taking a while. (by default, I think it's
30 seconds.)
If so, use: ini_set("max_execution_time", "time in seconds");
On Mon, May
w.pilotpig.net/
> 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
> >
> > Cheers
>
> Also the line:
>
> case "$config[HTTP_SERVER]help.php" :
>
> probably won't work very well : should be either
>
> case $config[HTTP_SERVER].'help.php':
>
> or
>
> case "{$config[HTTP_SERVER]}help.php":
>
> according to whether you like interpolation in quotes or not.
>
>
> I recommend finding a development environment or editor that does syntax
> highlighting - that would catch all of these problems before you even save
> the file.
>
> --
> Peter Ford phone: 01580 89
> Developer fax: 01580 893399
> Justcroft International Ltd., Staplehurst, Kent
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
>
> > > --
> > > Thanks!
> > > -Shawn
> > > http://www.spidean.com
> > >
> >
> > I think 'servername\sharename\folder\file.xml' will work if you're
> > using single quotes around the string. The only slashes that would
> > need escaped are the first two since the first slash in '\\' escapes
> > the second.
> >
> > Andrew
> >
> Guess not, as the backslash after the hostname escapes the next character.
> no matter if it's quoted.
>
> 'this is unterminated, btw \'
>
--
Martin Scotta
e both security and
> relative efficiency into account. I would want to make sure that data
> isn't shared between multiple concurrent sessions, which would be a bad
> thing for what I'm doing. my oh-so-limited knowledge of PHP is shining
> through, I think :)
>
> Thanks so much!
>
> James
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
tags($results);
>
>
> echo $raw;
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
ww.elemental.co.za
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> _
> Conheça os novos produtos Windows Live! Clique aqui.
> http://www.windowslive.com.br
--
Martin Scotta
> Regardless if I put 14 into $ex or "14" or '14' or even if I put the 14
> instead of the $ex into the if line, I get a blank screen. It seems tp
> me, from what I see in the manual that this should work... or am I
> supposed to know something that is not clear in the examples... ?
>
>
> --
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -
> Phil Jourdan --- p...@ptahhotep.com
> http://www.ptahhotep.com
> http://www.chiccantine.com/andypantry.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
27;howlong']);
> >
> > if ($purchprice) {
> > echo "Purchase Price:$ $purchprice";
> > }
> > if ($newmort) {
> > echo "Mortgage Amount:$ $newmort";
> > }
> > if ($howlong) {
> > echo "How Long has seller owned property: $howlong";
> > }
> >
> > Thanks
> >
> > Gary
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
sage
>> news:ea.e8.08167.6ac8a...@pb1.pair.com...
>>
>>
>>> I have a form that gives the submitter a choice or either one set of
>>> questions, or another. I am still getting the message even if the input was
>>> left blank. So on the line below,
>>>
>>> $msg.= isset($_POST['mort']) ? "The mortgage amount is $mort\n" : " ";
>>>
>>> I get
>>>
>>> The mortgage amount is
>>>
>>> What am I missing here?
>>>
>>> Thanks
>>>
>>> Gary
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
e you read the database - what a stupid waste of performance anyway.
Cons:
---
Instead "&" you'll see "&" ... is that a problem? Not for me and I
believe 80% of others who use DB to store & view on web.
Martin
--
PHP General Mailing List (http://www.php.
ethings about these issues. And i understand that If you use
> htmlentities() BEFORE insertion, when querying DB from XML, PDF or other
> data format, there will be some problems.
>
> I have some PHP books, the author codding like Martin Zvarík's way. If you
> have any pr
Cons:
1. Can't easily edit information in the database
True, so if you use phpmyadmin for editing - don't do what I suggested.
2. Can't display raw for the user (e.g. edit a forum post)
Edit a forum? You display the data in TEXTAREA...
3. Uses more space in the DB
True,
although I
Eddie Drapkin napsal(a):
2. Can't display raw for the user (e.g. edit a forum post)
Edit a forum? You display the data in TEXTAREA...
Because seeing something like:
"Yeah!" is what he said.
Is awesome for the user experience.
If you don't do html...() before putting to text
the elements you want to keep into a new array.
>>>>>
>>>>> Kirk
>>>>>
>>>> What about passing it by reference?
>>>>
>>>> foreach($results as &$key => &$item)
>>>> {
>>>> // modify items he
Philip Thompson napsal(a):
On Jun 23, 2009, at 9:29 AM, Martin Zvarík wrote:
Don't htmlentiies() before DB save. In general:
- mysql_real_escape_string() before DB insertion
- htmlentities() before dispaly
I, on the other hand, would do htmlentities() BEFORE insertion.
Pros:
---
The
ike there are always updates to some
> component or other, many of which I do not use and some of which would
> not actually install.
>
> When I went looking for an IDE, I wanted a good code editor with
> features like syntax checking and code completion, and I wanted a
> debugger that I could step through code to figure out why something
> wasn't working as I expected. There were a couple that were close, but
> I chose Zend Studio at the time because it seemed to have the most
> complete/accurate code completion not only of the core language, but
> also recognizing functions and classes declared within the PHP code in
> the project itself (especially when you include a basic phpdoc block
> that describes the function @params and @return). Perhaps the new
> version still does all that wonderfully well, but as I said I've found
> it to be not worth the hassle. Perhaps, to be fair, I need to take
> some time to get familiar with the new paradigm, but that furthers my
> point: I want an editor that I can be productive with more or less out
> of the box.
>
> Andrew
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
way to do it?
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nitsan Bin-Nun napsal(a):
I have wrote a PHP script that serves JPEG images in smaller size, the
resize is done using GD on-the-fly.
I have noticed an interesting issue during the "save image as..." dialog on
serveral internet explorer browsers, somehow, for some strange reason, the
JPEG file is
"NAMESPACE" in the class? Is it a reserved word?
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Imagine you are hosting 10.000 subdomains.
SOLUTION #1:
you create directories like:
a/
b/
...
s/
s/some-subdomain.freehosting.com/ (this includes CONF.php, where you
store some basic infos)
Everytime visitor hits the page you do:
@include('t/test-subdomain.freehosting.com/conf.php')
they
> provide the password again (even though they are already
> authenticated) on the same form with the new username. Then you can do
> the same encrypt/compare that you do for authentication, and if it
> matches you just update the username and the hash at the same time.
>
> Andrew
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and the value of their
> contribution and spend their time and talents where they are appreciated and
> not waste them on such nonsense.
>
> Cheers,
>
> tedd
>
> --
> ---
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
>
PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
if you need to access to a class constant use the built-in function
if( defined( get_class($myClass) .'
uck with
> me :p
>
> --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
cy services!
>
> Also, IP addresses can be converted to IP numbers with the long2ip()
> function of PHP, which means you can store them as long ints and do
> normal number comparisons on them, great for matching an IP address to a
> range of 'valid' ones.
>
> Thanks
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the function as static by using " public static
> function calculateRectangle($width, $height) { "
> then you can access the method by using just 1 call:
> $area = SomeMathFunctions::calculateRectange(10,15);
>
> So for creating utility functions its better to use static m
javascript
Click to lalalal
I've said it is not for a php thread
On Tue, Jul 14, 2009 at 10:29 AM, Bob McConnell wrote:
> From: Martin Scotta
>>
>> hahahahahaha
>>
>> How are you to delete my history?
>> The fact that you "develop" a website does not
itle sets to
> "picture.php (JPEG image)" and if i right-click it and click on
> "Proprieties" i get "0px × 0px (resized as 315px × 19px)".
>
> P.S.: I get the same result when I write $immagine =
> imagecreatefromjpeg(...)
>
> (Sorry for my engl
He is calling the function by variable
something like this
$func = 'var_dump';
$func( new Foo );
On Tue, Jul 14, 2009 at 1:30 PM, Ashley
Sheridan wrote:
> On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote:
>> $immagine = $tipo($this->updir.$id.'.png');
>
On Tue, Jul 14, 2009 at 1:48 PM, Ashley
Sheridan wrote:
> On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote:
>> He is calling the function by variable
>>
>> something like this
>>
>> $func = 'var_dump';
>>
>> $func( new Foo );
>>
( $this->updir . $id . '.png' );
}
hey, look, just 2 lines!
On Tue, Jul 14, 2009 at 2:20 PM, Ashley
Sheridan wrote:
> On Tue, 2009-07-14 at 14:16 -0300, Martin Scotta wrote:
>> On Tue, Jul 14, 2009 at 1:48 PM, Ashley
>> Sheridan wrote:
>> > On Tue, 2009-0
You can do a lot of things with him, even
have fun with it.
My idea is to make a simple game where your have to write some AI to
beat the other players AI
The idea, as simple as it looks, is really difficult to implement
specially about security
so, do you like me idea?
--
Martin Scotta
--
PHP
eneral idea is correct.
>>
>> 2) It implements numeric pagination, which is usually based on a
>> fixed number of rows per page. The OP wanted alphabetical pagination
>> (like an address book) with each page containing all entries that
>> begin with the selected letter.
>>
>>
>> Andrew
>
> I just had a query doing the same thing one time, and that did take it's time
> (about 2-3 seconds) but it did have a few million records to look at, so I
> can understand why it was slow!
>
> And it was on MSSQL, with no indexes set up :( I nearly cried when I saw what
> I was dealing with!
>
> --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Jul 15, 2009 at 4:55 AM, Carlos Medina wrote:
> Martin Scotta schrieb:
>>
>> Hi
>>
>> Do you noted that all the discussion here are about problems, bugs, or
>> just "urgent pleaaase help me"
>> I have an idea. It is not really THE idea... b
ea, as simple as it looks, is really difficult to implement
>> specially about security
>>
>> so, do you like me idea?
>>
>> -- Martin Scotta
>>
>
>
> sorry if this is getting OT:
>
> Martin, I wrote a really fun and charming remake of a great that 2 others
On Wed, Jul 15, 2009 at 12:29 PM, tedd wrote:
> At 1:21 AM -0300 7/15/09, Martin Scotta wrote:
>>
>> Hi
>>
>> Do you noted that all the discussion here are about problems, bugs, or
>> just "urgent pleaaase help me"
>> I have an idea. It is not rea
, $boolean ? ' ': ' ' ,
$test ,' $int === ' , bol2string($_test[-1]),
$_test[0] !== $_test[-1] ? ' / $int !== 0' : '' ,
PHP_EOL;
?>
--
Martin Scotta
class A could not be converted to
> > string."
> >
> > If it's catchable, why isn't it caught in my example?
>
> It's not an exception, it's a "fatal error". Fatal errors are caught
> by error handling functions, not by catch blocks.
>
> Consequence of having (at least) two separate error handling
> mechanisms in the same language.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
arting over at this point, but I'm hoping there is
> something I can just purchase, so I can concentrate on the rest of the
> sitehopefully the menu system would support PHP and ASP.
>
> Thanks for any information!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
>
My point of view:
# i'll use constants for these values
assert( ord('A') == 0x41 );
assert( ord('Z') == 0x5A );
# 1. get the ascii code of the 1st character or from A=0x41
$letter = ord( array_key_exists('letter', $_GET) ? strtoupper(
$_GET['letter']{0} ) : 'A' );
# 2. different solutions
# 2.a check if it is range ussing <= ussing constants (faster)
$letter = chr( 0x41<= $letter && $letter <= 0x5A ? $letter : 0x41 );
# 2. different solutions
# 2.b check if it is range min/max and with constants (faster)
$letter = chr( min( max(0x41, $letter), 0x5A) );
I'd use the 2.b but this has different behaviour when $letter > Z (should
this ever happen?)
In the other hand I think it is the faster one.
--
Martin Scotta
On Thu, Jul 16, 2009 at 12:01 PM, Miller, Terion <
tmil...@springfi.gannett.com> wrote:
>
> One question I still have...I had help with this script of course and I'm
> confused with the %s what does it do?
>
> On 7/16/09 9:53 AM, "Martin Scotta" wrote:
&g
Quick search in PHP.net!
php quick search
http://php.net/images/logos/php-icon-white.gif
http://search.php?pattern={searchTerms}"/>
UTF-8
false
I know php.net use method="POST", but it's quite easy to provide a GET
mechanism.
is this the correct place for posting this?
--
Martin Scotta
thing like this:
>
> // Always better to be plural when you have an array.
> $rows = whatever_your_rows_come_from();
>
> foreach($rows as $row)
> {
> $inType = $row['inType'];
> echo $inType . '';
> }
>
>
> HTH,
> Kyle
>
--
Martin Scotta
Makes sense? or is it enough to do it just once?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
David Otton napsal(a):
> 2009/7/20 Martin Zvarík :
>> > $i = 0;
>> do {
>> $i++;
>> $r = file_put_contents('file.txt', 'content');
>> } while($r === false && $i < 3);
>>
>> if ($r === false) die('error'
t;
> 2009/7/23 Shane Hill
>
> > 2009/7/22 João Cândido de Souza Neto
> >
> > > You made a mistake in your code:
> > >
> > >
> > >
> > > must be:
> > >
> > >
> >
> >
> >
>
>
> Short tag and not recommended as its deprecated now, would be void at PHP
> 6.0
>
--
Martin Scotta
;
>
RTM: http://php.net/unset
The behavior of *unset()* inside of a function can vary depending on what
type of variable you are attempting to destroy.
If a globalized variable is *unset()* inside of a function, only the local
variable is destroyed. The variable in the calling environment will retain
the same value as before *unset()* was called.
/ ... /
If a variable that is PASSED BY REFERENCE is *unset()* inside of a function,
only the local variable is destroyed. The variable in the calling
environment will retain the same value as before *unset()* was called.
I think the manual is very clear about unset.
--
Martin Scotta
?
> >
> > when you state it in those terms (which are clearly correct) i wouldn't.
> >
> > but if the way i think is "unset() destroys the specified variables" (as
> the
> > manual puts it) then i expect that the specified variable would be
> > destroyed, not the reference.
> >
> > so, as i said, i was a bit surprised when the variable wasn't destroyed.
> > once i understood what was happening, i thought it a bit confusing to
> have
> > such scope-dependent differences in behavior of a language element.
> >
> >
> It might be easier to understand if you don't use the same var names:
>
> function foo(&$arg) {
> $arg = 42;
> unset($arg);
> $arg = 'meaning';
> }
>
> $a = 0;
> foo($a);
> print("$a\n");
>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
is and could
> either point me in the right direction or just down and out tell me
> how to do it.
>
> Thanks so much
> --Eddie
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
Hi all
Is there a formal definition for the php language?
Where I can found it?
I've STW with no results.
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
any set of classes that handle ncurses easily?
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
est in this, please exercise your
> email-delete capabilities at this time.
>
> Thanks!
>
> --
>
> daniel.br...@parasane.net || danbr...@php.net
> http://www.parasane.net/ || http://www.pilotpig.net/
> Check out our great hosting and dedicated server deals at
> http://twitter.com/pilotpig
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ho hum...
>> >
>> > Thanks,
>> > Ash
>> > http://www.ashleysheridan.co.uk
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>> Har har. This was not a mindless 411 scam. It is a bit different
>> when an actual site people use gets hacked and their personal
>> information stolen. I too received one of these emails and it was
>> very convincing. It has my exact username from the Elance site and
>> was crafted in such a way that it seems this new site was a partner
>> with Elance somehow.
>>
>> --
>> http://www.ericbutera.us/
>>
> Is there nothing that anybody can actually do about this? Where is the
> new company based? Are there laws in that country about this sort of
> thing?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
11:14 AM, Ashley
Sheridan wrote:
> On Wed, 2009-08-05 at 11:10 -0300, Martin Scotta wrote:
>> Nobody can actually do anything. This happen all the time.
>>
>> Sites like facebook or myspace send invitations to all your mail's
>> contacts, but that's not the problem
xt (to
>>> indicate a page's current position). If the condition is not true, all the
>>> links (except the true current 'page') are supposed reload index.php and
>>> pass a variable to itself to place into $thisPage using
>>> href="index.php
on.
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Aug 5, 2009 at 10:10 AM, Jerry Wilborn >>>
>>>>> >wrote:
>>>>>
>>>>> Look
>>>>>
>>>>
>>>>
>>>> I'm having trouble understanding your description of the problem. Can
>>>>
>>>>> you
>>>>>> tell us what you're seeing and what you expect to see?
>>>>>> Jerry Wilborn
>>>>>> jerrywilb...@gmail.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe >>>>> >wrote:
>>>>>>
>>>>>> I am trying to generate pages by importing content in includes, and
>>>>>> using
>>>>>>
>>>>>>> my
>>>>>>> navigation include to tell PHP to replace a $thisPage variable which
>>>>>>> all
>>>>>>> the
>>>>>>> includes use
>>>>>>>
>>>>>>> The idea behind it (I know tons of people do it, but I'm new to this
>>>>>>> concept), is to have a 'layout' page where only a variable changes
>>>>>>> using
>>>>>>> $_GET on an href (index.php?page=services or index.php?page=about) to
>>>>>>> load
>>>>>>> the new 'pages'.
>>>>>>>
>>>>>>> PROBLEM:
>>>>>>> All my links are displaying the current page state, and links are not
>>>>>>> building around the link text (hrefs are built conditionally with if
>>>>>>> $thisPage != services then build the link, otherwise leave it as
>>>>>>> normal
>>>>>>> text). Same thing with the background image behind the link text (to
>>>>>>> indicate a page's current position). If the condition is not true, all
>>>>>>> the
>>>>>>> links (except the true current 'page') are supposed reload index.php
>>>>>>> and
>>>>>>> pass a variable to itself to place into $thisPage using
>>>>>>> href="index.php?page=" (after which I have a variable which stores
>>>>>>> "about"
>>>>>>> or "services" within the if statement near the link text.
>>>>>>>
>>>>>>> If this sounds like something you are familiar with (former issues and
>>>>>>> whatnot) please let me know what I'm doing wrong. I would be happy to
>>>>>>> give
>>>>>>> you any code you want to look at (index.php or navigation.php,
>>>>>>> whatever).
>>>>>>>
>>>>>>> Thanks again for your help PHP gurus!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
out" == $page)
>
> Then if you mis-type "==" as "=", PHP will fail immediately with a parse
> error.
>
> It feels a little weird but if it saves a lot of head-desk moments it's
> probably worth it. Now if only I could get into the habit myself...
>
;$Fruit_apple"; // I want this to return "organic"
>
> Or how are you guys dynamically naming PHP vars on the fly?
>
>
> John Butler (Govinda)
> govinda.webdnat...@gmail.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net
;> http://www.nabble.com/file/p24839092/guest-book.zip guest-book.zip
>> --
>> View this message in context:
> http://www.nabble.com/Displaying-user-data-and-picture-tp24839092p24839092.html
>> Sent from the PHP - General mailing list archive at Nabble.com.
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
That probably seems silly to you... but there are authors (and editors) who
thinks writing a book about the last version of PHP is a good business, and
don't care if the language is full featured or even "released"
It is up to you to read the book or not.
--
Martin Scotta
surprised if the feature stays the same at all. Just take a
> look at http://wiki.php.net/summits/pdmnotesmay09 and see what they're
> cooking up. Like I said before, PHP6 isn't feature-complete, and I
> don't suspect it's near it either, so it's definitely way premature to
> write a book on PHP6 and silly to buy one.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
tly appreciated.
>
> Thanks!
> Floyd
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
; Interesting that it works (without notice) if we check against the isset ()
> one first. It makes if() look more intelligent that I would think... as if
> it saying, "good now that we've established that the var isset, now is it
> also equal to '___'., as opposed to just, "is var set, and is var equal to
> "___'.
--
Martin Scotta
the conditions to their
> respective boolean results before evaluating the logical operators.
>
> Andrew
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
or find now) in PHP
> how to say "inverse your value" (to a boolean).
> ?
>
> TIA! -G
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
> Is this something I need to have in a database to work?
> >>
> >
> > no, you can do it with the arrays... but it may be easier to work with
> > over the long run if that data was in a db.
> >
> > Anyway right after you finish creating the array and it's embedded
> arrays,
> > in your code, then add this:
> > var_dump($shows); //--so you can see what you just created. If it looks
> > right, THEN go on bothering to try and parse it with your (embedded)
> > foreach's {
> >
> >
> > John Butler (Govinda)
> > govinda.webdnat...@gmail.com
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
Martin Scotta
t; TIA! -G
> > >
> > >
> >
> > >
> > $arr = range(1, 10);
> >
> > $i = 0;
> > foreach ( $arr AS $row ) {
> >
> > $row_color = ( ( $i++ % 2 ) ? 'green' : 'red');
> >
> > echo $row_color;
> >
> > }
> >
> > ?>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
ray( 'even', 'odd' );
# after new requirements it is...
$styles = array( 'white', 'white', 'gray' );
foreach($items as $item)
{
printf( '%s', current( $styles ), $item );
next( $styles ) or reset( $styles );
}
The simplest solution is always the best choice.
This provides maintainability and flexibility to changes ( that we don't
know yet )
--
Martin Scotta
e legible.
$sql = preg_replace('|\n#[^\n]*\n|', '', $sql);
Personally I try to not use double quoted.
PHP parses single quoted very much faster.
# for this
echo "Hi, $name, wellcome $home";
# I use
echo 'Hi, ', $name, ', wellcome ', $home;
# or
printf( 'Hi, %s, wellcome %s', $name, $home );
And of course, this is a matter of taste!
--
Martin Scotta
On Wed, Aug 12, 2009 at 10:25 AM, Robert Cummings wrote:
>
>
> tedd wrote:
>
>> At 4:08 PM -0400 8/11/09, Robert Cummings wrote:
>>
>>> tedd wrote:
>>>
Hi gang:
I want to show the dates for all Fridays +-30 days from a specific date.
For example, given today's date (8/11/2
Mandriva Linux Contributor [http://www.mandriva.com/]
> >PulseAudio Hacker [http://www.pulseaudio.org/]
> >Trac Hacker [http://trac.edgewall.org/]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
', $link );
What SQL was sent to the database?
Looking at bin logs I've found this.
1. use database => mysql_select_db
2. use database: SELECT * FROM => mysql_query
The DB is usually a common bottle-neck for most applications.
You can have several webservers, but can't do that with the DB... of course,
you can have multiples slaves but just 1 master.
is this the best way to send queries?
What's the better and faster way?
--
Martin Scotta
gt;
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Well, this was a nice experiment.
What do we must learn about this? performance < legibility
Stuart solutions look that's the faster, but in the other hand Shawn's
solution 2 looks the most legible (so far).
--
Martin Scotta
>
> would be interesting to see.
>
> I personaly woudn't spend the time on logs, a computer is logical, I try to
> be logical, and I would
> try to create code which is logical speedy. I expect the database kernel
> programmer the same.
>
> I think then we are on th
attached through this list... so, if you
want a copy just reply to this message.
Any bug, comment, or anything you like to say is welcome!
--
Martin Scotta
On Wed, Aug 12, 2009 at 6:27 PM, Ralph Deffke wrote:
> it would help if u would tell us what u want to accomplish with this
> ativity
>
> cheers
> ralph_def...@yahoo.de
>
> "Martin Scotta" wrote in message
> news:6445d94e0908121323x721254c4ja389978d67b
Hi all.
Is this going to save me anything?
something() )
return true;
something() )
return true;
--
Martin Scotta
agree.
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ects using
many designs patterns.
By example the RecursiveDirectoryIterator and it's family use the decorator
pattern.
Also features such as "late static binding" were added because a design
pattern.
I think there will be some "separation" in the community, those who will
stay using scripts and those who will use heavily OOP. I do not know who the
"dark side" will be, xD
--
Martin Scotta
ds with the remaining complimentary values).
> Martin suggested I use the following code for my update script (which is
> posted to via the process page):
>
> [code]
>
> foreach($_POST as $key => $value)
>if( '0' == $value || '' == $value )
>{
>
files .php so, database.ini will be database.php
2) Put in the top of your script this line
;
So, when the file is opened as an ini file the semilcolon indicates that
it's a comment.
But, when the browser call for this file... php just exit's in the first
line.
Our data will be safe as long as the first line will remains there.
--
Martin Scotta
inuity, embed, isapi, milter, nsapi, phttpd, pi3web, roxen, thttpd,
tux,webjames
should I look at php source-code for these values?
--
Martin Scotta
ting one (like __set() ) ovewrites the standard one?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
t( $c );
>
> $d->doSomething();
>
> echo "script ending now ...";
>
> ?>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
-- Forwarded message --
From: Martin Scotta
Date: Tue, Aug 25, 2009 at 6:24 PM
Subject: Re: [PHP] DOMNode children iteration (was Re: array() returns
something weird)
To: webmas...@strefarytmu.pl
Fatal error: Call to a member function getAttribute() on a non-object in
testme.php
2006/12/31, Michel <[EMAIL PROTECTED]>:
I (very simply) try to open a "notepad" on a simple text file in a
simplistic PHP script, and would like to go on and display the next page
without waiting for this notepad to be shut.
After various attempts, I have used an :
exec ('bash -c cmd /C start
Backward compatibility with PHP4, where member functions couldn't be
declared as static. Any member function could be called statically providing
a static context instead of an object instance.
2007/1/16, Cheseldine, D. L. <[EMAIL PROTECTED]>:
Hi
I'm stuck on The Basics page of the php5 Object
Forgot to mention that calling a non-statical function this way should
generate an E_STRICT warning.
2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>:
Backward compatibility with PHP4, where member functions couldn't be
declared as static. Any member function could be called
Try the following:
$server->register('getColumns', array(), array());
The second argument is an array containing an entry for each argument of the
webservice call, and the third argument is an array for the return value.
Since you don't have either arguments nor return value, empty arrays should
Double slash to prevent PHP interpreting the slashes. Also using single
quotes would be a good idea:
if (preg_match('/[\\w\\x2F]{6,}/',$a))
2007/1/19, Németh Zoltán <[EMAIL PROTECTED]>:
Hi all,
I have a simple checking like
if (preg_match("/[\w\x2F]{6,}/",$a))
as I would like to allow all
2007/1/20, Arpad Ray <[EMAIL PROTECTED]>:
Martin Alterisio wrote:
> Double slash to prevent PHP interpreting the slashes. Also using single
> quotes would be a good idea:
>
> if (preg_match('/[\\w\\x2F]{6,}/',$a))
>
Just switching to single quotes would do the t
2007/1/22, Beauford <[EMAIL PROTECTED]>:
... much blah blah blah ...
I've probably read 100 pages on this, and no matter what I try it doesn't
work. Including all of what you suggested above - is my PHP possessed?
if(preg_match("/[EMAIL PROTECTED]&()*;:_.'/\\ ]+$/", $string)) { gives me
this
2007/1/30, speedy <[EMAIL PROTECTED]>:
Hello PHP crew,
As a followup to:
http://bugs.php.net/bug.php?id=22879
That's not a bug, just an user doing things the wrong way and blaming the
language.
I've stumbled upon this problem in a way:
function f()
{
global $arr;
foreach($arr as $
2007/1/30, speedy <[EMAIL PROTECTED]>:
Hello Martin,
> Tuesday, January 30, 2007, 8:45:50 PM, you wrote:
>
> function f()
> {
>global $arr;
>
>foreach($arr as $k=>$v) {
>$v->do_something();
>}
> }
>
> I don't see y
If you want to do it in one regular expression, without listing each case,
you can use a lookahead assertion:
/^(?=.*8.*)[0-9]{4}$/
The assertion (?=.*8.*) checks that the following matches the expression
contained (.*8.*) which fails if there is not an 8.
2007/2/9, Peter Lauri <[EMAIL PROTECTE
2007/2/9, Martin Alterisio <[EMAIL PROTECTED]>:
If you want to do it in one regular expression, without listing each case,
you can use a lookahead assertion:
/^(?=.*8.*)[0-9]{4}$/
The assertion (?=.*8.*) checks that the following matches the expression
contained (.*8.*) which fails if t
1301 - 1400 of 1967 matches
Mail list logo