Re: [PHP] Add lines to a text file

2002-12-11 Thread Kent Sandvik
On Wednesday, Dec 11, 2002, at 13:36 US/Pacific, Antti wrote: Thanks it works. I forgot to say that i need to add a new line to that file. Now it puts all the stuff at the same line. How do I make it to add lines? Use fputs with the string ending with a \n, as in: $xmlfp =

RE: [PHP] echo vs printf

2001-07-16 Thread Kent Sandvik
As I understand it, echo is not a function it's a language something or other, supposedly it runs slightly faster than print given the same output. ?php class xTimer{ var $time_start; var $time_delta; function Start(){ $this-time_start =

RE: [PHP] Variable name declarations?

2001-07-14 Thread Kent Sandvik
function sum_array( $input_array ) { var $index; var $sum = 0; for( $index = 0; $index count( $input_array ); $index++ ) $sum += $input_array[ $index ]; return $sum; } The array variable issue has indeed bitten me a couple of times, so now all my arrays are

RE: [PHP] Re: Rename a File?

2001-07-11 Thread Kent Sandvik
rename(moo.php, foo.php); Also, works cross-platform. In most cases try to find a function that is part of PHP rather than using the shell, especially if you are interested in making sure the code works across platforms. There's also most likely a performance hit when starting a shell

RE: [PHP] Re: Warning: mail() is not supported in this PHP build

2001-07-11 Thread Kent Sandvik
Just I have another question, does anyone know where PHP puts everything when it installs? I keep recompiling PHP and Apache, and every time I run phpinfo() it still has the original build date. I tried deleting: If installed as RPM package: $ rpm -ql php This gives the

RE: [PHP] Code Examples for Job Interview

2001-07-09 Thread Kent Sandvik
You could also bring with you someone else's code :-). Frankly speaking, if I interview programming candidates, I define a couple of practical problems to see what kind of background they have, how to solve it, the thinking process is as important as the final result. If someone gives a stock

[PHP] Latest documentation in PDF format?

2001-06-26 Thread Kent Sandvik
Hi, I saw that the PHP documents in PDF format are temporary unavailable at: http://www.php.net/docs.php Now, I do have a working Acrobat 4.0 version back home, any interest if I built the HTML versions to PDF format, or is there something else I don't know about, i.e. an automated backend for

[PHP] $PHP_SELF name space?

2001-06-24 Thread Kent Sandvik
Hi, is there something silly I'm doing (latest PHP 4.0.5), when this does not work at all: --- class xCrumbs { function Render(){ echo $PHP_SELF; } } $crumbs = new xCrumbs(); $crumbs-Render(); while echo $PHP_SELF; works just fine? Or something with name spaces and when $PHP_SELF

RE: [PHP] Need recommendation: good user management system (PHP/MySQL)

2001-06-21 Thread Kent Sandvik
Stuff I'm using here, could be better, but it's a start: --- For MySQL (or other SQL database): cat create_access_tbl.sql /* --- FBI Access Control Database Format -- * This is the proposed format for the access control database. * Use mysql to recreate the database if needed. * *

Re: [PHP] PHP/OCI8 design for persistent connection tuning

2001-04-17 Thread Kent Sandvik
My first instinct is to run a second apache process on a separate port or on another IP, that would be tuned for flatfiles. It'd mean that I'd have to code all my scripts to tell it to look for www.somewhere.com:88/banner.gif, which is fine since this is a new architecture. Yes, if you have