[PHP] [php] question about ob_end_flush

2008-11-27 Thread jason liang
Hi all I am comfused about the function ob_end_flush.In the manual:This function will send the contents of the topmost output buffer (if any) and turn this output buffer off. i have made such tests. ?php ob_start(); echo hello word!; ob_end_flush(); ? this works alright.the script

Re: [PHP] [php] question about ob_end_flush

2008-11-27 Thread Robert Cummings
On Fri, 2008-11-28 at 12:01 +0800, jason liang wrote: Hi all I am comfused about the function ob_end_flush.In the manual:This function will send the contents of the topmost output buffer (if any) and turn this output buffer off. i have made such tests. ?php ob_start(); echo

RE: [PHP] while-question

2008-11-19 Thread bruce
-general@lists.php.net Subject: RE: [PHP] while-question Dabbling? I think that making a living from it isn't dabbling, so I may not be qualified to speak for the dabblers. But for me, I was writing code before there were such courses. Later, when I went to college I was taught

Re: [PHP] while-question

2008-11-19 Thread Shawn McKenzie
bruce wrote: interesting points regarding college and programming.. my degrees bsee/msee covered alot more than pure programing.. as a double ee/cs, the ability to articulate an issue/problem, and bring to mind a cogent thought process was valuable. the ability to understand how different

Re: [PHP] while question

2008-11-18 Thread Nathan Rixham
Ashley Sheridan wrote: On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it

Re: [PHP] while-question

2008-11-18 Thread Nathan Rixham
tedd wrote: At 7:02 PM -0500 11/17/08, Craige Leeder wrote: I'm not illiterate; promise :p - Craige Yeah, his parents were married before he was born. Cheers, tedd omg tedd, I was just reading this thread over, thought exactly that witty response, clicked you're reply and there it is;

Re: [PHP] while-question

2008-11-18 Thread Craige Leeder
Jochem Maas wrote: just for laughs .. given the 'dabble' thread Cleeder is phonetically very very close to a dutch word meaning 'messing around' .. rather in the way a 2yo might mess around with a bowl of yogurt. Haha, now that does make me laugh. Out of curiosity, what is the actual word

Re: [PHP] while-question

2008-11-18 Thread Jochem Maas
Craige Leeder schreef: Jochem Maas wrote: just for laughs .. given the 'dabble' thread Cleeder is phonetically very very close to a dutch word meaning 'messing around' .. rather in the way a 2yo might mess around with a bowl of yogurt. Haha, now that does make me laugh. Out of curiosity,

Re: [PHP] while-question

2008-11-18 Thread Craige Leeder
Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while-question

2008-11-18 Thread Nathan Rixham
Craige Leeder wrote: Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige don't believe him, jochem is really called Bob Davis, a slightly balding middle aged ASP developer from hull sent to infiltrate the PHP community and misguide

Re: [PHP] while-question

2008-11-18 Thread Bastien Koert
On Tue, Nov 18, 2008 at 9:33 AM, Nathan Rixham [EMAIL PROTECTED] wrote: Craige Leeder wrote: Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige don't believe him, jochem is really called Bob Davis, a slightly balding middle aged

Re: [PHP] while-question

2008-11-18 Thread Robert Cummings
On Tue, 2008-11-18 at 14:33 +, Nathan Rixham wrote: Craige Leeder wrote: Jochem Maas wrote: klieder ... kliederen the E sound is short. Interesting to know. Thanks :D - Craige don't believe him, jochem is really called Bob Davis, a slightly balding middle aged ASP

Re: [PHP] while question

2008-11-18 Thread Ashley Sheridan
On Tue, 2008-11-18 at 10:52 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working

[PHP] while question

2008-11-17 Thread Alain Roger
Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = count($my_array);

Re: [PHP] while question

2008-11-17 Thread Stut
On 17 Nov 2008, at 13:01, Alain Roger wrote: i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always

Re: [PHP] while question

2008-11-17 Thread Thodoris
Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = count($my_array);

RE: [PHP] while question

2008-11-17 Thread Jay Blanchard
[snip] ...foreach... [/snip] You could also use a for loop if you wanted to count; for($i = 0; $i count($array); $i++){ echo $i . \n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] while-question

2008-11-17 Thread Timo Erbach
...but for best performance you should do: $counter = count($array); for($i = 0; $i $counter; $i++){ echo $i . \n; } So the expression count() in the for()-loop is only parsed once and not every loop. Regards Timo [snip] ...foreach... [/snip] You could also use a for loop if you wanted

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Timo Erbach schreef: ...but for best performance you should do: $counter = count($array); for($i = 0; $i $counter; $i++){ echo $i . \n; } just for fun: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); ... gives an idea of the power and flexibility of a

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
Jochem Maas wrote: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); think the point of this is to count the items in an array without count mate :p no point in the above you could just: $c = count($a); foreach! $a = range(1,10); $c = 0; foreach($a as $b) {

RE: [PHP] Another question about Google maps

2008-11-17 Thread Boyd, Todd M.
-Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Saturday, November 15, 2008 2:11 PM To: php-general@lists.php.net Subject: [PHP] Another question about Google maps Hi gang: I posted this question on the Google Map Discussion group/list thingie, but got zip

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); think the point of this is to count the items in an array without count mate :p no point in the above you could just: $c = count($a); I thought the point was to avoid

Re: [PHP] while-question

2008-11-17 Thread Stut
On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) { //code here but no + - / * operators return $answer; } echo add(5, 17);

Re: [PHP] while-question

2008-11-17 Thread Andrew Ballard
On Mon, Nov 17, 2008 at 9:47 AM, Jochem Maas [EMAIL PROTECTED] wrote: Nathan Rixham schreef: Jochem Maas wrote: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); think the point of this is to count the items in an array without count mate :p no point in the

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) { //code here but no + - / * operators return $answer; } echo add(5,

RE: [PHP] Another question about Google maps

2008-11-17 Thread tedd
At 8:37 AM -0600 11/17/08, Boyd, Todd M. wrote: tedd, I think it might be displaying your extra divs (if there are any.. just skimmed the source momentarily) for a split second before they are hidden with Javascript. Maybe try setting the CSS for your 3 map divs (mapsearch, idlediv, searchdiv or

Re: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 14:54 +, Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) { //code here but no + -

RE: [PHP] while-question

2008-11-17 Thread bruce
... ? -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:53 AM To: Stut Cc: Nathan Rixham; php-general@lists.php.net Subject: Re: [PHP] while-question On Mon, 2008-11-17 at 14:54 +, Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Robert Cummings schreef: On Mon, 2008-11-17 at 14:54 +, Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) {

RE: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 10:00 -0800, bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've

Re: [PHP] while-question

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 19:07 +0100, Jochem Maas wrote: Robert Cummings schreef: On Mon, 2008-11-17 at 14:54 +, Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using

Re: [PHP] while-question

2008-11-17 Thread Nathan Rixham
bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the tools and started

RE: [PHP] while-question

2008-11-17 Thread tedd
At 10:00 AM -0800 11/17/08, bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the

RE: [PHP] while-question

2008-11-17 Thread Wolf
Dabbling? I think that making a living from it isn't dabbling, so I may not be qualified to speak for the dabblers. But for me, I was writing code before there were such courses. Later, when I went to college I was taught adventures in keypunching and received several next to

RE: [PHP] while-question

2008-11-17 Thread tedd
At 2:55 PM -0500 11/17/08, Wolf wrote: Tedd, glad you got hooked on Phonics. One of these days I hope from graduating from just looking at the pictures, but right now the pictures are oh so enticing!. ;) Wolf Wolf: Lot's of exciting things -- hard to keep up on bots, automated buying,

Re: [PHP] while question

2008-11-17 Thread Craige Leeder
Alain Roger wrote: Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count =

Re: [PHP] while question

2008-11-17 Thread Ashley Sheridan
On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Alain Roger wrote: Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this

Re: [PHP] while question

2008-11-17 Thread Craige Leeder
Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it by reference. - Craige Can you do that? I assume it would look like this:

Re: [PHP] while question

2008-11-17 Thread Ashley Sheridan
On Mon, 2008-11-17 at 18:01 -0500, Craige Leeder wrote: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it by reference.

Re: [PHP] while-question

2008-11-17 Thread Craige Leeder
bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the tools and started

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: At 10:00 AM -0800 11/17/08, bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people

Re: [PHP] while-question

2008-11-17 Thread Craige Leeder
Jochem Maas wrote: must . resist I take you didn't score to hig on the spelling test? and collage, is that the the cut-n-paste school of IT? dang it, failed. ;-) Haha! 'high' was just my 'h' key not pressing, and college is just one of those words I have trouble with.

Re: [PHP] while question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it by reference. - Craige Can you do that? I

Re: [PHP] while-question

2008-11-17 Thread tedd
At 12:52 AM +0100 11/18/08, Jochem Maas wrote: Craige Leeder schreef: I'm 100% self taught for now. I'm just out of higschool, and hopefully going off to collage next year. must . resist I take you didn't score to hig on the spelling test? and collage, is that the the

Re: [PHP] while-question

2008-11-17 Thread tedd
At 7:02 PM -0500 11/17/08, Craige Leeder wrote: I'm not illiterate; promise :p - Craige Yeah, his parents were married before he was born. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] while question

2008-11-17 Thread Micah Gersten
Jay Blanchard wrote: [snip] ...foreach... [/snip] You could also use a for loop if you wanted to count; for($i = 0; $i count($array); $i++){ echo $i . \n; } This is not good because you are calling count every loop iteration. Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: At 12:52 AM +0100 11/18/08, Jochem Maas wrote: Craige Leeder schreef: I'm 100% self taught for now. I'm just out of higschool, and hopefully going off to collage next year. must . resist I take you didn't score to hig on the spelling test? and collage, is that

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: Jochem Maas wrote: must . resist I take you didn't score to hig on the spelling test? and collage, is that the the cut-n-paste school of IT? dang it, failed. ;-) Haha! 'high' was just my 'h' key not pressing, and college is just one of those

Re: [PHP] Another question about Google maps

2008-11-16 Thread Michael Kubler
Well, it shows up for FFox v2 and v3 on Windows XP as well. I managed to replicate it by shift+refreshing the page. I also managed to stop it mid load by setting Firefox to 'Work Offline' just as it displayed the flash of both boxes. Using the Web Developer plugin for FFox I can tell you that

Re: [PHP] Another question about Google maps

2008-11-16 Thread tedd
At 1:29 AM +1030 11/17/08, Michael Kubler wrote: Well, it shows up for FFox v2 and v3 on Windows XP as well. I managed to replicate it by shift+refreshing the page. I also managed to stop it mid load by setting Firefox to 'Work Offline' just as it displayed the flash of both boxes. Using the

[PHP] Another question about Google maps

2008-11-15 Thread tedd
Hi gang: I posted this question on the Google Map Discussion group/list thingie, but got zip in replies. Maybe someone here might have an idea. Here's the url: http://masoncollision.com/contact.php In both Safari and FireFox for the Mac (I have not tested it with other browsers) as the

[PHP] CREATE question

2008-10-30 Thread Dan Shirah
All, Is it possible for us to use PHP to create temp tables in our database? Ironically, up until this point I have only needed to use SELECT statements. But now, to speed up the processing time of a large query I would like to create a temp table and then reference the temp table in another

Re: [PHP] CREATE question

2008-10-30 Thread Micah Gersten
AFAIK, the query commands just pass the query to the DB engine. The DB decides whether or not to execute. You need special permissions in mssql and mysql to create things. I don't know about informix. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dan

Re: [PHP] CREATE question

2008-10-30 Thread Daniel Brown
On Thu, Oct 30, 2008 at 2:19 PM, Dan Shirah [EMAIL PROTECTED] wrote: Is it possible for us to use PHP to create temp tables in our database? [snip!] But all that does is give me an ifx_prepare fails message. (Forwarded to PHP-DB as well.) Dan, make sure Informix is set to allow that

Re: [PHP] CREATE question

2008-10-30 Thread Dan Shirah
On 10/30/08, Daniel Brown [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 2:19 PM, Dan Shirah [EMAIL PROTECTED] wrote: Is it possible for us to use PHP to create temp tables in our database? [snip!] But all that does is give me an ifx_prepare fails message. (Forwarded to PHP-DB as

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-26 Thread Carlos Medina
Rob Gould schrieb: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-24 Thread Colin Guthrie
Robert Cummings wrote: On Fri, 2008-10-24 at 00:18 -0400, Rob Gould wrote: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or

[PHP] PHP/mySQL question using ORDER BY with logic

2008-10-23 Thread Rob Gould
Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence de

Re: [PHP] PHP/mySQL question using ORDER BY with logic

2008-10-23 Thread Robert Cummings
On Fri, 2008-10-24 at 00:18 -0400, Rob Gould wrote: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or La Chapelle

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached in memcache. If anything changes in an object it changes an

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Jochem Maas
Stut schreef: On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached in memcache. If anything changes in an object it

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Dan Joseph
On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will always be called at the end of script execution. but you have no

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Eric Butera
On Wed, Oct 22, 2008 at 9:42 AM, Dan Joseph [EMAIL PROTECTED] wrote: On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 14:42, Dan Joseph wrote: On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will always be called at the end of

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 09:35, Jochem Maas wrote: Stut schreef: On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Dan Joseph
On Wed, Oct 22, 2008 at 2:29 PM, Stut [EMAIL PROTECTED] wrote: Never any issues this way? They always run without a hitch? Not had any issues to far, and it's being used on some pretty busy sites and various PHP versions and several different web servers. Terrific! Thanks for the

[PHP] Re: Question about __destruct()

2008-10-21 Thread Mike van Riel
Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true when a page ends its execution? Example, I call a database class. It constructs,

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Jochem Maas
Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true when a page ends its execution? Example, I call a database

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Stut
On 21 Oct 2008, at 22:08, Jochem Maas wrote: Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true when a page

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Jochem Maas
Stut schreef: On 21 Oct 2008, at 22:08, Jochem Maas wrote: Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true

[PHP] App Question.

2008-10-14 Thread bruce
Hi list!! Got a question, and I can't find a good answer for, so I figured i'd post here. I'm working on a project that involves a number of smaller apps to be developed, and run. In order to build this overall application, I'm trying to find a web based app that I can use to manage the entire

[PHP] Re: question about EOF

2008-09-30 Thread Ross McKay
On Tue, 30 Sep 2008 12:48:35 +0800, LKSunny wrote: i want on inner EOF do something, calculate and call function ? can not ? if yes, how to ? Same way as you do with strings. e.g. ?php class foo { function bar() { return 'world!'; } function hello() { echo ENDHELLO Hello,

[PHP] ftp_pasv - question

2008-09-17 Thread jogisarge
hello @all, i have to change my ftp connection in passive mode. now i am not sure, where i have to place the ftp_pasv statement. do i have to place it after ftp_connect or after ftp_login, or ... i hope somebody can help me ! by jogi -- View this message in context:

Re: [PHP] ftp_pasv - question

2008-09-17 Thread Wolf
jogisarge [EMAIL PROTECTED] wrote: hello @all, i have to change my ftp connection in passive mode. now i am not sure, where i have to place the ftp_pasv statement. do i have to place it after ftp_connect or after ftp_login, or ... i hope somebody can help me ! by jogi Sure,

Re: [PHP] Readdir() question

2008-09-12 Thread Luke
When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and structures and such.

Re: [PHP] Readdir() question

2008-09-12 Thread Jochem Maas
Luke schreef: When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and

Re: [PHP] Readdir() question

2008-09-12 Thread Luke
Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing: ID Name Type

Re: [PHP] Readdir() question

2008-09-12 Thread Nathan Rixham
Luke wrote: Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing:

RE: [PHP] Readdir() question

2008-09-12 Thread Boyd, Todd M.
-Original Message- From: Luke [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2008 7:13 AM To: Jochem Maas Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Readdir() question Ok, one folder on your webserver, and put all of the files that you want

[PHP] Readdir() question

2008-09-11 Thread Ben Stones
Hi, I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think its called, __DIR__

Re: [PHP] Readdir() question

2008-09-11 Thread Stut
On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the

RE: [PHP] Readdir() question

2008-09-11 Thread Jay Blanchard
[snip] I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think its called, __DIR__

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Ben Stones schreef: Hi, I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto just in one include

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto

[PHP] multiple question form creation

2008-08-26 Thread Alain R.
Hi, i have a web application in which some people should be able to create form adding questions and possible answers. basically user should: 1. type the question (which will be displayed to customer) 2. select type of answers (closed, open, list, multiple answer, and so on...) 3. add

Re: [PHP] multiple question form creation

2008-08-26 Thread Dan Shirah
Hi, i have a web application in which some people should be able to create form adding questions and possible answers. basically user should: 1. type the question (which will be displayed to customer) 2. select type of answers (closed, open, list, multiple answer, and so on...) 3. add

Re: [PHP] multiple question form creation

2008-08-26 Thread Alain R.
thanks a lot Dan, i already know this possibility with textarea but it is not so nice. i would like to do something like under windows/linux. to have a button and when user click on it it add a new field for a new answer... however i do not know if it is so nice step for customer... any other

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-26 Thread Micah Gersten
I said AFAIK. I was under the impression the DirectoryIndex did a redirect. I just tested it and it does not, so you are correct Jochem. He has everything he needs. He'll need the document root and $_SERVER['REQUEST_URI'] to do this. Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-24 Thread Ólafur Waage
I am pretty certain that this isnt possible under current code. But i just wanted a confirmation on this, since i worked on the code for a while trying to get to the end point. And yes Jochem, i am looking for a magical location :P Well, thanks guys :) Ólafur Waage 2008/8/24 Micah Gersten

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-24 Thread Jochem Maas
Micah Gersten schreef: What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. you know wrong. he has all the info needed. 1. the document root of the site (/var/www/example.com) 2. the

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results Ólafur Waage 2008/8/23 Robert Cummings [EMAIL PROTECTED]: On Fri,

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Luke, i am looking for local directory info. Not URL info as i said before. And Ashley, as i said in the original mail. I had tried $_SERVER. Thanks for the reply though. Ólafur Waage 2008/8/23 Luke [EMAIL PROTECTED]: $_REQUEST? Luke Slater Lead Developer NuVoo On 23 Aug 2008, at 12:53,

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread David Otton
2008/8/23 Ólafur Waage [EMAIL PROTECTED]: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results If checking the output

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Thanks for this David, i was using REQUEST_URI and other $_SERVER info and mixed that together. It worked in some situations but on hosted servers (like GoDaddy and others like that where they use a complicated directory setup) it does not work. Olafur Waage 2008/8/23 David Otton [EMAIL

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Jochem Maas
Ólafur Waage schreef: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. __DIR__ only came into existence very recently IIRC, realpath(dirname(__FILE__)); will tell you what directory the *current script* is actually living in

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Micah Gersten
What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I am within a certain directory

<    3   4   5   6   7   8   9   10   11   12   >