I second this - great to see both finally available. Fantastic release!
Martin Amps | CIO
www.iCracked.com
iCracked | Redwood City, CA
On Jun 21, 2013, at 2:01 PM, Julian wrote:
> Awesome work and the new design for the php.net website is also nice ;)
>
> Am 20.06.2013, 23:22 Uhr
must be identical."
Confusing, the "name" attribute on a form field ("input", "textarea",
"select", etc) is different to the "name" attribute on a "a" or "form"
element, so this rule does not apply to it.
Thank you, Benjamin
not have to be the same.
Thank you, I thought it should be the same (for same reason, maybe
compatibility between XHTML and HTML). But could not find anything on
the net which states this. So my memories might be corrupted :)
Based on first tests, it works (but have not checked the W3C validato
not have to be the same.
Thank you, I thought it should be the same (for same reason, maybe
compatibility between XHTML and HTML). But could not find anything on
the net which states this. So my memories might be corrupted :)
Based on first tests, it works (but have not checked the W3C validato
passed
parameters automatically converted to arrays in PHP?
Thank you for any tips,
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but what's evident is that your script is eating memory.
Thanks,
Justin Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ed it, but you could also simply try using
ZipArchive::addFromString without deleting the file first. It may just
overwrite the file.
Thanks,
Justin Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, I had forgotten that attachments weren't accepted on the list.
My code can be found at http://pastebin.com/6nmR67c3.
The test NBT can be found via the NBT specification link.
Thanks,
Justin Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
mething about binary
data, or is PHP's pack/unpack functionality indeed lacking? And, if the
pack and unpack functions are indeed lacking, is it possible to handle
binary data without those functions?
Thanks,
Justin Martin
<>
--
PHP General Mailing List (http://www.php.net/)
store
directories or the use a different header for sending the file?
If someone has a working solution let me know.
Best Martin
On Oct 8, 2010, at 17:18, TR Shaw wrote:
> I don't have any problem in this regard.
>
> On Oct 8, 2010, at 11:09 AM, Nathan Rixham wrote:
>
>
Hello,
I am using PHP 5.3.3 compiled as PHP-FPM.
My Apache is using mod_fastcgi to connect to PHP-FPM and everything works as
expected.
Unfortunately I don't know how to forward request http://localhost/status to
PHP-FPM so that I will see the status page of PHP-FPM.
I found only NGINX configurati
Mess
Dne 27.2.2010 5:01, clanc...@cybec.com.au napsal(a):
A week ago Dasn asked a question about converting arrays, and I quoted one
possible way of
achieving his task, using the operation:
$i = 0; while ($i< $k) { $b[$a[$i++]] = $a[$i++]; }
I added the comment that "I have always been war
> revealing unrelated with the class.
>
> Anyway, I am not upset. I am just sorry that you made many criticisms
> without giving real examples to demonstrate your points. That way it
> will not be helpful to anybody.
>
>
> --
>
> Regards,
> Manuel Lemos
>
> Find and post PHP jobs
> http://www.phpclasses.org/jobs/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
..
>
> ...
> foreach($_FILES[' UPLOADIMAGE3 '] as $file_name => $file_array) {
> ...
>
> Thanks for reading!
> Matt Cheezoid
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Your foreach does exactly what you are asking.
foreach($_FILES as $file_name => $file_array)
The keys in $_FILES are the in your form.
If you have 3 files... then count( $_FILES ) should be 3
--
Martin Scotta
but I find this works quite well:
>
>
>
> The way you are hiding the actual link URL will work for people who
> navigate solely with their mouse, but you might want to add an onfocus()
> handler in there as well for people who tab between links.
>
> At the end of the day though, none of this will stop someone from
> viewing your source code for the link, or using a browser plugin like
> Firebug to determine what it is.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
Why I will let you to hide things on my browser?
The browser is mine...
--
Martin Scotta
ou can use any text editor.
I use SciTE. It is free and open source.
It does not provide any tool of any kind. It just allow me to write code,
and that's all I need.
Also there are a lot of tools for development.
And IDE is just a fat text editor with lot of tools on it, and in some cases
it can make your development slower.
You can improve your development with a set of lightweight tools, this is
the linux style.
--
Martin Scotta
ust finishing testing against 5.2.10 down to 5.2.4. I am not sure how
> many people are still using versions between 5.2.0 and 5.2.3
>
> I would like to know those ones too
>
> --
> "Good Enough" is not good enough.
> To give anything less than your best is to sacrifice the gift.
> Quality First. Measure Twice. Cut Once.
>
Hi!
I develop for 4.3.10 and 5.2.6 at work.
At home I use 5.2.9, it was installed by xubuntu
Our hosting providers have 5.2.0 or 5.2.4
--
Martin Scotta
et/get_included_files
>
> --
> Larry Garfield
> la...@garfieldtech.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You can use the tokenizer's functions to parse the files and recover the
information.
They are easy to understand and make the perfect tool for this kind of
scenario.
I'd like to know how do you solve this.
cheers
--
Martin Scotta
ething';
> >
>
> Or the simplist approach is to define at constant at app initialization
> and use it:
>
> echo 'Something';
>
> --
> 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
echo 'Anonymous';
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
&g
hen $data's value is evaluated (to
> true or false), or is the actual assignment tested (does the assignment
> fail, etc)?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The code is interpreted this way...
$data = somefunc();
if ($data)
--
Martin Scotta
ow WHERE *show_id = '$id'*;";
> $result3 = mysql_query($query3) or die('Record cannot be located!' .
> mysql_error());
> $row3 = mysql_fetch_array($result3);
> $show_id = $row3['show_id'];
>
> How do I select the item I just inserted to obtain the ID number??
>
mysql_insert_id <http://ar.php.net/manual/en/function.mysql-insert-id.php>
mysqli->insert_id <http://ar.php.net/manual/en/mysqli.insert-id.php>
--
Martin Scotta
On Tue, Oct 27, 2009 at 9:30 PM, Raymond Irving wrote:
> Hi Martin,
>
> This works great but I was hoping that I didn't have to loop through
> get_declared_classes to find the sub class.
>
> Is there a way to get the subclasses using Reflection? For example:
>
> $
>
Just having FUN, do not take me serious : )
function getInstanceRandom()
{
$classes = get_declared_classes();
$index = array_rand( $classes );
return new $classes[ $index ]();
}
$obj = getInstanceRandom();
echo get_class( $obj );
This is way you NEVER know which class you will instantiate!
--
Martin Scotta
ss Beer extends Bar {}
Class Pier extends Bar {}
function get_subclasses($class)
{
$sub = array();
foreach(get_declared_classes() as $name )
{
$rClass = new ReflectionClass($name);
if( $rClass->isSubclassOf( $class ))
{
$sub[] = $name;
}
}
return $sub;
}
print_r( get_subclasses( 'Foo' ));
print_r( get_subclasses( 'Bar' ));
--
Martin Scotta
le, it's public properties are used
on the loop.
foreach($object as $prop => $value )
//php translates the foreach into something like this...
foreach(get_object_vars($object) as $prop => $value )
--
Martin Scotta
On Thu, Oct 22, 2009 at 8:40 AM, Thodoris wrote:
>
>
>>
>>> I don't think it is about readability:
>>>
>>> $arr[3] = 'test';
>>> $test = 3;
>>>
>>> //This prints "$test"
>>> echo "This doesn't work: $$arr[3]";
>>>
>>> //This prints 3
>>> echo "This works: ${$arr[3]}";
>>>
>>> Using the same type
-is-what.com
> > http://gibberish.co.il
>
>
> Not that I know of, and trying to explain any sort of code over the
> phone is just going to lead to a disaster down the line!
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
--
Martin Scotta
Ben
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Martin Scotta
tabase engine => change the
loader/persister.
You need to add/remove/modify some new rules in your business logic =>
change the models
Why don't you allow the view to use the model?
This way you have...
# the controller is responsible to instantiate the model(s) and view(s)
# the model is responsible for the business logic
# the view is responsible for the presentation
--
Martin Scotta
ide effect but in other situations it really
matter.
Does these behaves exactly?
for($i=0; $i<10; ++$i)
for($i=0; $i<10; $i++)
There is no side effect on the incremental section because the result is not
evaluated.
and what about these?
$array[ $index++ ] = $elem;
$array[ ++$index ] = $elem;
You can read more about the side effect at
http://en.wikipedia.org/wiki/Side_effect_%28computer_science%29
--
Martin Scotta
hleysheridan.co.uk
>
Unless you store the object state your application will not be able to
remember it.
There is a design pattern specially designed for this, the Memento Pattern (
http://en.wikipedia.org/wiki/Memento_pattern)
There are many ways to persist an object: sessions, xml, text files,
databases.
Pick the one that fits better and you'll be fine.
--
Martin Scotta
tp://www.ashleysheridan.co.uk
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I think php convert the boolean variable to string before print its content.
That's why...
echo true; # prints '1'
echo false; # does not prints anything, or prints ''
$bool = false;
var_dump(
(string) $bool,
(int) $bool
);
--
Martin Scotta
ing types while
comparing values.
$a = 'false';
$b = true;
var_dump(
$a == $b, # <-- true
$a === $b # <-- false
);
This happens because values are converted before comparison so, 'false'
becomes true.
PHP converts everything different to an empty string as *true*
This also affect any type of variable.
--
Martin Scotta
explode($code)
{
$lines = array();
$buffer = '';
for($i=0, $len = strlen($code); $i<$len; ++$i)
switch( $code{$i} )
{
case "\r":
case "\n":
if( $i+1 == $len )
break 2;
if( "\r" == ($next = $code{ $i+1 }) || "\n" == $next )
{
++$i;
}
$lines[] = $buffer;
$buffer = '';
break;
default:
$buffer .= $code{$i};
}
if( '' !== $buffer );
$lines[] = $buffer;
return $lines;
}
--
Martin Scotta
AHA !!!
OMG... how come I did not see that!?
Instead this:
$array =& $array[$final];
unset($array);
This:
unset($array[$final]);
3 AM in the morning... that must be the reason! .)
Thanks.
This is possible. You're just not giving enough consideration to your
exit strategy :)
array
Robert Cummings napsal(a):
Martin Zvarík wrote:
$ARR = array(
'a' => array('b' => 'blah')
);
function set($key)
{
global $ARR;
foreach ($key as $i => $k) {
if ($i == 0) {
$sourcevar =& $ARR[$k];
$ARR = array(
'a' => array('b' => 'blah')
);
function set($key)
{
global $ARR;
foreach ($key as $i => $k) {
if ($i == 0) {
$sourcevar =& $ARR[$k];
} else {
$sourcevar =& $sourcevar[$k];
}
}
// unset($sourcevar); // w
y el mutuo beneficio a través de "compartir
conocimiento" se realize semejante acotación; aunque mucho mas triste es que
una persona oficialmente perteneciente a dicha comunidad se sume a dicho
reclamo.
Please do not reply that It's a English based list.
Or is it allowed to discriminate here?
As a non-english speaker I feel very uncomfortable with this thread.
With the best intentions for the community, sincerely yours,
Martin Scotta
Spanish Speaker
er is not able to
navigate to private areas in both sites.
Avoid doing things like a form-post from SiteA to SiteB. This kind of things
only make holes to your application security system.
User credentials MUST not be handled at client-side. Keep them safetily at
server-side where you are who decide which action should be taken.
--
Martin Scotta
s by count( $_POST ) > 0 but this only applies for
application/x-www-form-urlencoded forms.
Other content-type will not populate the $_POST and therefore need to be
validated by other method.
PHP provides non-yet-standard HttpRequest class that can handle this
perfectly
--
Martin Scotta
p;& $_POST['username'] != '')
> { ...
>
>
> >>
> >> I'm sure that this is not the best/recommended way to do this but I'm
> >> hoping someone here will point me in the right direction.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
Martin Scotta
On Fri, Aug 28, 2009 at 10:39 AM, Ashley Sheridan
wrote:
> On Fri, 2009-08-28 at 10:34 -0300, Martin Scotta wrote:
> > Actually there aren't a safe way to make a redirect
> >
> > We have 4 alternatives (correct me if I miss anything) to do a safe
> > redirec
/*<![CDATA[*/
// redirect by javascript (3)
window.location = '<?php echo $url ?>';
/*]]>*/
You are about to be redirected to in 2
seconds
Click here if your browser do not redirect automatically
It's recommended that your use a common redirect method in your site, this
is not mandatory but it is a good practice.
This simple script also helps to prevent session problems under some evil
web-server by closing the session before any output.
--
Martin Scotta
of DB you can use, and if you use an open source alternative then it's
legal, that's mean you, or your client, do not have to pay for use it.
I'm not going to say *that* DB is better that *this* other, this is a matter
of taste.
--
Martin Scotta
g along these lines, but I wrote a much more efficient
> way to make sure I grab all the data of a known length...
>
> function readSocketForDataLength ($socket, $len)
> {
>$offset = 0;
>$socketData = '';
>
>while ($offset < $len) {
>if (($data = @socket_read ($socket, $len - $offset,
> PHP_BINARY_READ)) === false) {
>return false;
>}
>
>$offset += strlen ($data);
>$socketData .= $data;
>}
>
>return $socketData;
> }
> ?>
>
> If not all the data is obtained on a read, it will loop until the amount of
> data is the same as the length requested. This is working quite well.
>
> Thanks Bob and the others!
>
> ~Philip
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
socket related:
Does this solution work on both, blocking and non-blocking sockets ?
And what about different read method?
solution related:
Does strlen works fine with binary data?
Does this snippet work for sending/receiving multibytes strings?
--
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
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
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
inuity, embed, isapi, milter, nsapi, phttpd, pi3web, roxen, thttpd,
tux,webjames
should I look at php source-code for these values?
--
Martin Scotta
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
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 )
>{
>
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
agree.
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all.
Is this going to save me anything?
something() )
return true;
something() )
return true;
--
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
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
>
> 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
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
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
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
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
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
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
> 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
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
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
; 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
tly appreciated.
>
> Thanks!
> Floyd
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
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
> 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
;> 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
;$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
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...
>
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
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
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
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
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
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
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
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
?
> >
> > 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
;
>
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
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
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'
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
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
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
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
>
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
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
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
, $boolean ? ' ': ' ' ,
$test ,' $int === ' , bol2string($_test[-1]),
$_test[0] !== $_test[-1] ? ' / $int !== 0' : '' ,
PHP_EOL;
?>
--
Martin Scotta
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
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 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
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
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
( $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
1 - 100 of 1987 matches
Mail list logo