Re: [PHP] anyone interested in PHP? Call for moderator

2009-09-15 Thread Yeti
It is good to hear that they teach PHP in kindergarden these days. //Yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How can an elephant count for nothing?

2009-02-13 Thread Yeti
I guess the main reason for PHP to behave like this is to make life easier for many everyday situations. EXAMPLE: User input via GET or POST - usually string You compare it to some value - int/string or whatever So if a user posts '17' (string) and you compare it to 17 (int), unless you are using

Re: [PHP] How can an elephant count for nothing?

2009-02-12 Thread Yeti
> Can anyone explain clearly why comparing a string > with zero gives this apparently anomalous result? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help on caching an object.

2009-02-11 Thread Yeti
Hello gang, First of all, yes I searched the mailing list's archive. My problem is very simple: I have an object that's definately called with every page request. It's pretty much the same for every unregistered/anonymous user. And it's not small. Alot of attributes are being set from DB queries

Re: [PHP] Searching in a long text

2009-01-03 Thread Yeti
What if the whole text has only 1 line? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What does

2008-12-28 Thread Yeti
I think it can also be set in .htaccess php_flag short_open_tag off somebody confirm this or not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Yeti
Basic bar code detection is not that difficult. You set a couple of virtual lines over the images and "crawl" them pixel by pixel. Then you count the black/white changes and the density of each change. I could even think of doing this using GD if I had the time. On the other hand it can get pretty

Re: [PHP] Chrome 1.0 released

2008-12-14 Thread Yeti
It more and more seems like a conspiracy against M$ to me. A company trying to make up its own standards every once in a while, how can that be wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Yeti
I have to defend poor little IE a little now. It supports XHTML and CSS2 pretty well so far. And those standards came out a couple of months ago. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Yeti
I got so used to Opera's mouse gestures, now I can't work fluently with other browsers. So I tried Chrome for like 5 minutes. It's always like "How do I go back to the previous page again or how do I open a new tab?". As long as Chrome is not being bundled with new computers the average Windows use

Re: [PHP] A MySQL Question

2008-12-09 Thread Yeti
> Sure you can... I'm screaming right now... and I'm in space. A container > within a container within a container within a container (ad infinitum) > is still within the outermost container. I didn't hear you scream. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] A MySQL Question

2008-12-09 Thread Yeti
As a matter of fact, in space you can't even scream. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A MySQL Question

2008-12-08 Thread Yeti
Who says the big bang is past? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Yeti
I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters. EXAMPLE: [EMAIL PROTECTED] We are living in a multilingual world with dozens of alphabets. Especiall those doing government sites should consider accessibilit

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Yeti
> I put a small one together using regular expressions, > http://www.ashleysheridan.co.uk/coding_php_validation.php So we are "regexing" emails again? #OUT OF coding_php_validation.php COPY case 'email': { $expression = "/^([a-z0-9_\-\.]+)@([a-z0-9_\-\.]+)\.([a-z]{2,5})$/i"; $erro

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Yeti
Nuclear power plants got the MCA [1] Developers got the MCA [2] [1] maximum credible accident [2] maximum credible addlebrained Both of them are what nobody likes to think of, but they can (and do?) happen. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Yeti
Java Script should always be an option, unless you write the validation for yourself or people you personally know only. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] adding key-> value pair to an array

2008-12-03 Thread Yeti
> > //you can get really stupid with this.. > ${false} = 'some string here'; > echo ${''}; > //echos some string here > I like stupid things -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
And yet another thing i have overseen in my statement .. If you remove the first for loop, also change the sql query. But I'm sure you saw that already NEW QUERY: $sql = "SELECT study,symbol FROM test WHERE study IN ('".implode(', ', $myArray)."')"; -- PHP General Mailing List (http://www.php.ne

Re: [PHP] adding key-> value pair to an array

2008-12-03 Thread Yeti
> //for each row I want to add percentage as new key->value pair > // but it gives error 'Undefined variable: > percentage' >$row->$percentage = ($browseCount / $totalCount ) * 100; Obviously you get the error because $percentage is not defined .. I did not

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
Correcting myself now .. $myArray = array('b2005', 'b2008'); $sql = "SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]')"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0) { while ($myrow = mysql_fetch_array($result)) { if (in_array($myrow['study'], $myArray)) $combi

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
> How should I proceed? Thanks in advance for any suggestions. Since you are looping through the result already, why not do it this way .. $combinedArray = array(); for ($i=0;$i 0) { while ($myrow = mysql_fetch_array($result)) { if (in_array($myrow['study'], $myArray)) $combinedArray[$m

Re: [PHP] Accessing the 'media' attribute in php

2008-12-03 Thread Yeti
t requires the page to reload ... For PHP have a look at this page ... http://www.maratz.com/blog/archives/2004/09/21/10-minutes-to-printer-friendly-page/#printQuery //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Short circuit evaluation and include

2008-12-02 Thread Yeti
Hello everyone, I'm posting this as a warning when using include() or include_once() and checking their return values. I'm refactoring someone else's code at the moment and got a short circuit evaluation problem that made some problems .. Here's the code: FILE "some_file.php": some_method()

Re: [PHP] array_intersect question

2008-12-02 Thread Yeti
> The question is how to perform intersection on the following structure: > > $products = > array(array("green","red","blue"),array("green","yellow","red"),array("green","red","purple"),array("green","red","yellow")); If I understood you correctly .. -- PHP General Mailing List (http://www.php

Re: [PHP] How to hide MySQL password in connection string in PHP script?

2008-12-02 Thread Yeti
"Robert Dodier" robert_dodier AT yahoo.com wrote on 12-21-2003 > Hello, > > I am experimenting with a wiki system (PhpWiki) which uses > a MySQL database to store pages. It seems like a great system. > > The MySQL connection string is specified in a PHP script > in the form "mysql://FOO:[EMAIL PROT

Re: [PHP] Happy Turkey Day

2008-11-27 Thread Yeti
Today was a holiday? I looked "Thanksgiving" up and wikipedia said it's some kind of harvest festival. I guess that's why some mentioned turkeys .. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Voting methodology

2008-11-26 Thread Yeti
o ask oneself how serious the result has to be. Getting a 99% bulletproof result might be quite time consuming (thinking of HTTPS, tokens, authorization, etc. here). So it all depends on what your client wants. //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] getStatic

2008-11-24 Thread Yeti
> What would you do? I think PHP's string functions are pretty fast and even with large documents we are talking about a couple of extra microseconds on a modern machine. I once saw someone do pretty much the same as you are trying to do with strtr() [1], but I don't know if that function is faste

Re: İlgi: [PHP] a for loop and probability random all i need is make them to reverse

2008-11-22 Thread Yeti
2008/11/22 Tontonq Tontonq <[EMAIL PROTECTED]>: > sorry i think i did tell u wrong about it problem is not showing name > of it as exaclty i just wanted give a point to it thats not real > problem real problem is i want it be more unpossible when i give the > class's add function's higher value In

Re: [PHP] Re: Some kind of Popup

2008-11-22 Thread Yeti
> One issue is I don't want to leave the space available on my regular web > page and would like to try not to overwrite something there - I'd rather > have a separate window of some sort that sort of floats over the web page. Well, since Javascript does the Job anyways you don't have to load it w

Re: [PHP] Re: Some kind of Popup

2008-11-22 Thread Yeti
Another JavaScript method would be to load the content in a hidden div with position: absolute. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] a for loop and probability random all i need is make them to reverse

2008-11-22 Thread Yeti
That should output the full line now $y) { $yy = arasi(" in ",")",$y); $yy = str_replace(",","",$yy); $xcx[]=$yy; #echo $yy.""; $itemisim = explode("(",$y); $itemisim=$itemisim[0]; $xcx[isim][]=$itemisim; } for($i=0;$i<=count($xcx)-1;$i++) { $prExample->add( $xx[$i], $xcx[$i] ); // <-- changed to

Re: [PHP] IMagick confusion

2008-11-22 Thread Yeti
First of all .. always be careful with tainted data. Like when you $picture = $_GET['PICTURE']; be aware that this could be a security risk one day an ImageMagick exploid is circulating. At the first glance I saw a syntactical thingy that might cause problems .. case default: break; In PHP swit

Re: [PHP] about SimpleXMLElement.

2008-11-22 Thread Yeti
There are some nice SimpleXML examples at php.net, one of them also covers handling attributes ... http://in.php.net/manual/en/simplexml.examples.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Anyway to simulate pcntl_fork() on Windows?

2008-11-21 Thread Yeti
check this out ... http://in.php.net/manual/en/ref.pcntl.php#37369 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Model Web Site

2008-11-20 Thread Yeti
>> What is new to me is controlling access based on being a member. And >> making it tough for hackers. > > Look for a tutorial on building a login system and go from there. Since you mentioned security I would recommend HTTPS. http://en.wikipedia.org/wiki/HTTPS -- PHP General Mailing List (http

Re: [PHP] store class zithin session

2008-11-20 Thread Yeti
If you can't load the class before calling session_start you can store the serialized object in a file and simple set a $_SESSION['path_to_file'] session variable.. EXAMPLE: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Invalid Arguements

2008-11-19 Thread Yeti
> when I use the var_dump as suggested I get: > *Parse error*: syntax error, unexpected '<' in * > C:\Inetpub\wwwroot\WorkOrderSystem\WorkOrder.php* on line *136* I guess that means you tried something like this ... EXAMPLE: ?> Can you see what PHP does not like here? It's the second "http://w

Re: [PHP] Stats (was anchor name on URL)

2008-11-19 Thread Yeti
I think it's also interesting to know what browsers web developers prefer [1]. Also what people would like to know more about [2]. Number 1: howto kiss Number 5: howto hack (lol?) [1] http://www.w3schools.com/browsers/browsers_stats.asp [2] http://www.google.com/intl/en/press/zeitgeist2007/mind.h

Re: [PHP] Invalid Arguements

2008-11-19 Thread Yeti
if you what do you get? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: anchor name on URL

2008-11-19 Thread Yeti
> Now I tend only to use it now for file management, FTP and testing > websites. Beware that Konqueror has changed with KDE4. Now its main purpose is to be a web browser, whereas the new program "Dolphin" is used for file management etc. -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Re: anchor name on URL

2008-11-18 Thread Yeti
> I look forward to the day when markup isn't so bloated > due to the inability of certain web browser franchises to "get it right." Although I usually look at the future through an optimistic point of view, that day may never come. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] anchor name on URL

2008-11-18 Thread Yeti
If you do not escape the name attribute you might run into trouble when using XHTML. Always escape attributes properly. GOOD: Click me Click me too HEREDOC; ?> BAD: Click me'; echo 'Click me too'; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: phpDesigner 2008?

2008-11-18 Thread Yeti
Yes, NetBeans became my favourite too a while ago. And it runs on many Operating Systems, is free and has a debugger. I also like the way it handles projects. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] implode()

2008-11-18 Thread Yeti
with implode one can reverse the function arguments i know .. but -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Experience (was: while-question)

2008-11-17 Thread Yeti
Ok, ok I admit it. PHP is a programming language. I guess I drank too much assembly code today. By the way ... Motorola 68000! Those were to good old days. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Experience (was: while-question)

2008-11-17 Thread Yeti
who says PHP means programming? All I see is script code, unless you write your own extension or you contribute to php-internal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Days until Easter and Christmas

2008-11-16 Thread Yeti
> I guess Canadians are slower, eh? :-) LOL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RegEx to check for non-Latin characters

2008-11-15 Thread Yeti
Hi Behzad, I would try a different approach ... EXAMPLE (UTF-8): http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Persia '; } function mbStringToArray ($string, $encoding) { $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_s

Re: [PHP] Recursive Static Method

2008-11-12 Thread Yeti
Some code would be quite helpful here. But your scenario should not make any problem. EXAMPLE: "; include_once('test.php'); } } foo::test(); ?> EXAMPLE (@file: test.php): OUTPUT: Call 1Call 2 //A yeti -- PHP General Mailing List (http://www.php.ne

Re: [PHP] fopen not working corectly on remote IIS

2008-11-11 Thread Yeti
As PHP says ... there seems to be something wrong with file permissions. Make sure the IIS-user (if there is one on windows) can read intekendb.php. I don't know if you checked [1] yet. It's alot of useful info about php on IIS. Quote out of that article: The IIS user (usually IUSR_MACHINENAME) ne

Re: [PHP] ??????????? ??????? 648-67-61 ??? ?????? ? ???? ?????? ? ??????

2008-11-05 Thread Yeti
no comment -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Secure redirection?

2008-11-05 Thread Yeti
I wonder why you redirect the page via php when the browser supports JavaScript Why not let JS do the redirect after the XMLHttpRequest? figurative code .. if (BROWSER DOES NOT SUPPORT JS) header("Location: http://$host$url";); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] basic php question...

2008-11-04 Thread Yeti
Do disability browsers support JavaScript? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Электронная реклама 648-67-61 все адреса и базы Москвы и России

2008-11-04 Thread Yeti
Command unkown. Make sure you typed it right. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Grouping records

2008-11-04 Thread Yeti
e current rowid's Groupid is changed to $persons[CURRENT_PERSON] if that one exists. As result we should get an array $rowids with the Groupid for each array. So simply loop through that array and have the database SET the Groupid somehow like this .. EXAMPLE $group) { echo <<

Re: [PHP] Re: removing text from a string

2008-11-04 Thread Yeti
Replying to myself now. On Tue, Nov 4, 2008 at 7:40 AM, Yeti <[EMAIL PROTECTED]> wrote: >> ltrim($line, '0123456789 .'); > > I am feeling a bit boneheaded now. How easy things can be. > This would not work if the character string after the number started with a n

Re: [PHP] Re: removing text from a string

2008-11-04 Thread Yeti
> ltrim($line, '0123456789 .'); I am feeling a bit boneheaded now. How easy things can be. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Grouping records

2008-11-04 Thread Yeti
> I have transactional records with the following structure Records of what kind? Is it SQL? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] removing text from a string

2008-11-04 Thread Yeti
php [mb_substr] http://in.php.net/manual/en/function.mb-substr.php //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions in object oriented code

2008-10-31 Thread Yeti
> I can't really understand that. Not sure if you understand my problem > properly (if I've not explained properly). Anyone can give me some solutions > please? Well as long as you don not provide any code it's all just wild guesses. What I tried was to show you a way of simply preventing the HTML

Re: [PHP] Sessions in object oriented code

2008-10-30 Thread Yeti
html); ?> There is still plenty of other possible solutions. Keep on rocking [1] http://in.php.net/manual/en/ref.outcontrol.php [2] http://in.php.net/manual/en/function.str-replace.php //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mailing lists

2008-10-30 Thread Yeti
My 5-year-old had pretty much the same discussion with his sister -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mailing lists

2008-10-30 Thread Yeti
>Even a four year old girl would think that's too pink, Rich. What's wrong with pink? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex validation

2008-10-30 Thread Yeti
ceo wrote: >var_dump(imap_rfc822_parse_adrlist('"! # $ % & * + - / = ? ^ _ ` { | } ~"', >'')); >This looks like a valid localhost email address to me... It surely is a valid localhost email address, but what most people (and the OP) usually need is to validate a full email string with a local an

Re: [PHP] Regex validation

2008-10-30 Thread Yeti
After "ceo" posted about the imap function I was eager to try it out and got rather disappointed pretty soon. imap_rfc822_parse_adrlist() should not be used for email validation! EXAMPLE: The above code will output: array(1) { [0]=> object(stdClass)(2) { ["mailbox"]=> string(36) "!

Re: [PHP] Re: Printing JPEG

2008-10-30 Thread Yeti
If you are on a linux box with lpr [1] running you could try a shell_exec() in combination with imagemagick [1] http://tldp.org/HOWTO/Printing-Usage-HOWTO-2.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Bitwise operation giving wrong results

2008-10-30 Thread Yeti
Usually in PHP one does not take much care about the data types, but in this case you absoloodle have to. If you use bit operators on a character then its ascii number will be taken instead (how should a number based operation work with a string?) also if you pass on $_GET params directly into ay

Re: [PHP] Regex validation

2008-10-29 Thread Yeti
On Wed, Oct 29, 2008 at 5:36 AM, <[EMAIL PROTECTED]> wrote: > > When it comes to email validation, I would recommend using the IMAP function > which will be both fast and correct: > > http://us.php.net/manual/en/function.imap-rfc822-parse-adrlist.php > > Otherwise, it's guaranteed that you are ha

Re: [PHP] Regex validation

2008-10-28 Thread Yeti
> If your trying to filter E-Mail addresses, then filter_var is what you > should use: > > http://php.net/filter_var If the OP (original poster) got PHP5+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing URLs

2008-10-28 Thread Yeti
One could also abuse basename and pathinfo. Works in PHP4+ http://www.domain.com/page/file/'; $pathinfo = pathinfo($uri); $webpageaccess = array(); $webpageaccess[1] = $webpageaccess[2] = ''; if (isset($pathinfo['basename'])) $webpageaccess[1] = $pathinfo['basename']; if (isset($pathinfo['dirname'

Re: [PHP] Re: Interactive canvas example

2008-10-26 Thread Yeti
h.tooltip.style.left = '-999'; //older opera fix } return RGraph.Tooltip(canvas, text, x, y); } return RGraph.tooltip; // return tooltip obj as stated in functions comment } catch(e) {

Re: [PHP] Interactive canvas example

2008-10-26 Thread Yeti
? Congratulations on that one //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] clear a mysql table

2008-10-25 Thread Yeti
I used to have a similar problem What I did was to define a max number of cashed pages. So when reaching that number I simply did it the FIFO way -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Building an array, kind of?

2008-10-24 Thread Yeti
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what's the difference in the following code?

2008-10-24 Thread Yeti
rity problems. (..) [end quote] It's the old "What's good code and what's bad code?" discussion. In this case ternary operations are bad code. >sorry for my bad english Die Code tun nicht Unterschiede in Execution. Es ist Sicherheits Frage. sorry for my bad German

Re: [PHP] export data to a ms excel file using php

2008-10-23 Thread Yeti
I'm not into MS Office, but isn't there some weird Office XML format since Office 2007? At MSDN I could find a nice description of the wannabe standard [1]. So if the new Excel can take XML it wouldn't be too difficult to export the data I guess. [1] http://msdn.microsoft.com/en-us/library/aa33820

Re: [PHP] Inheritance of class methods

2008-10-23 Thread Yeti
Using extends means that a class IS-A substructure of its parent class(es). EXAMPLE: class plant { }; class tree extends plant { }; class apple_tree extends tree { }; apple_tree inherits all methods and attributes from plant and tree So if there was a methods plant->growth() you can also call it

Re: [PHP] MkDir Help

2008-10-22 Thread Yeti
If you are prior PHP5 write your own recursive mkdir function [1] as posted on this list a while ago. [1] http://marc.info/?l=php-general&m=121926660406116&w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Difficulty navigating symlinks

2008-10-22 Thread Yeti
If you are in control of you DNS records you could CNAME [1] the sites to the same address, where a PHP script or RewriteRule [2] loads the specific configuration by checking the requested URI. Since you got them on the same server anyways this would not cost any performance. [1] http://www.zytrax

Re: [PHP] Re: -help

2008-10-22 Thread Yeti
Well maybe it is because he has register_globals on why he is not printing a list of valid arguments. imagine something like this .. @php-generals$ [PHP] -help List of valid arguments: -c, --make-me-forget erases the built-in mainframe's short term memory -f, --flush-me erases the entire memory o

Re: [PHP] Problem changing file encoding

2008-10-22 Thread Yeti
A neat way to transcode between different encodings is htmlentities and html_entity_decode [1, 2] EXAMPLE: There was a user with a similar problem at phpbuilder forums [3]. Have a closer look at it. [1] http://us2.php.net/manual/en/function.htmlentities.php [2] http://us2.php.net/manual/en/fun

Re: [PHP] Re: -help

2008-10-22 Thread Yeti
>-help: invalid argument I like the way you handle input errors in your php-general subroutines David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what's the difference in the following code?

2008-10-21 Thread Yeti
OP = original poster (in this case I guess) http://acronyms.thefreedictionary.com/OP So it's all about making code readable and probably easier to maintain (even people unfamiliar with the script). Doesn't that render the ternary operator IF-statement unnecessary? Have I been totally wrong using i

Re: [PHP] Securing AJAX requests with PHP?

2008-10-21 Thread Yeti
> True, but then my permission / auth / workflow schema defines all that. the > user won't like have that permission, the request will be logged and nothing > is ever deleted from the app in any case since I only allow soft (record > level flag ) deletes to ensure data integrity I agree with Basti

Re: [PHP] Re: what's the difference in the following code?

2008-10-18 Thread Yeti
> Wrong. They are equivalent. The second is probably just easier to follow > with a clearly defined default value outside the conditional block. Well, leaving out the default value at the 2nd if statement makes a difference and that's what I did. Here is the code I changed again .. Set to $_GET['

Re: [PHP] Re: what's the difference in the following code?

2008-10-18 Thread Yeti
I would understand it if it was like this .. In the first statement $search would either be set to $_GET['search'] or an empty string, whereas in the second statement $search would only be set, if there is a $_GET['search'] //A yeti -- PHP General Mailing List (htt

Re: [PHP] Securing AJAX requests with PHP?

2008-10-18 Thread Yeti
Ok, but how safe are tokens? Thinking of man in the middle attacks they do not make much sense, do they? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing AJAX requests with PHP?

2008-10-17 Thread Yeti
>but whose counting :-)) Someone is for sure. Maybe the scheduler? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Information on Cookies

2008-10-15 Thread Yeti
> You encrypt stuff with a string that you keep secret. That string is needed > to decrypt the string. I recommend you change that string once in a while. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP to get File Type

2008-10-14 Thread Yeti
tain the MIME by checking the extension. //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Yeti
Ok, so empty is faster. I appreciate the time you guys took to bench the thing. But I'm still gonna use array_key_exists. If you like it or not. Using it a couple of times in my scripts will slow them down a few nanoseconds. That's plain evil mwhahaha. //A yeti -- PHP General Mailing

Re: [PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Yeti
> Personally, I very rarely see the point in using array_key_exists... It's a > function call and has overhead where as isset() and empty() are language > constructs and (I would hope) are much more efficient (although I've not done > any benchmarks) # i don't know what's wrong with this .. $f

Re: [PHP] 1 last error to fix before the application is done!

2008-10-14 Thread Yeti
You might also want to try array_key_exists if (array_key_exists('loggedin', $_SESSION['userInfo'])) { // do something with $_SESSION['userInfo']['loggedin'] } //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP to get File Type

2008-10-14 Thread Yeti
> Is there any function in PHP to get the file/Mime type of any file? check this out: http://us2.php.net/manual/en/function.finfo-open.php //A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pure PHP Templating Class/AJAX Problem

2008-10-13 Thread Yeti
Well after looking at the template thing you posted with your link it seems to me like PHP is used to create working XML. So i wonder why you are using AJAX here. Now could it be that you use appendChild() ? That function would simply add the XML again. It's not easy to tell if you are not showing

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
You are absoloodle right about that. Although I'm not sure about their greediness, which might be different. I prefer the '{0,}' in my rewrite rules because I usually define the max-length to prevent code injection. eg. # to make sure only the first 8 chars get passed on to PHP RewriteRule ^blog/

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
>Jessen wrote: >RewriteRule ^blog/([^/]+)/([^/]+)/ blog.php?getparam1=$1&getparam2=$2 >[NC,QSA,L] Of course, your truely does what the OP asked for + it cuts of all strings after the last / /A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
> What's the point of using '{0,}' instead '*' ? Well the thing is that with the {0,} more REQUEST_URIs are valid: eg. /blog /blog/ /blog/17 /blog/17/ /blog/17/0 /blog/17/0/ AND additional characters get ignored (like when it is necessary to reload content with javascript, due to caching issues)

  1   2   >