Re: [PHP] SQL statement for clearing a table

2001-06-22 Thread Adam Wright
DELETE FROM table_name; adamw - Original Message - From: Wilbert Enserink [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 22, 2001 1:17 PM Subject: [PHP] SQL statement for clearing a table Hi all, anybody knows the mysql statement for clearing the contents of a table and

Re: [PHP] Recursively create directories

2001-05-15 Thread Adam Wright
This should do what you want... $dir = dir1/dir2/dir3/dir4; $dir_array = explode(/,$dir); $full_path = ; foreach($dir_array as $current_dir) { $full_path .= /$current_dir; if (!is_dir($DOCUMENT_ROOT . $full_path)) { mkdir($DOCUMENT_ROOT./ .$full_path,0700); } } adamw -

Re: [PHP] isset() VS if($var)

2001-04-09 Thread Adam Wright
isset actually sees if the variable exists, and has been assigned a value (where if is obviously checking for boolean truthfulness). Thus... $a = 0; if (isSet($a)) print "A is set"; //This line will execute if (isSet($b)) print "B is set"; //This line never will, as B has not been set to

Re: [PHP] Permission denied

2001-03-23 Thread Adam Wright
Don't forget, PHP (in general) runs as the webserver (normally "nobody" or "apache" for Apache servers). Make sure your webserver has write access to /home/jalmberg/public_html/qiksys/images/ adamw - Original Message - From: "John Almberg" [EMAIL PROTECTED] To: "PHP General List" [EMAIL

Re: [PHP] Permission denied

2001-03-23 Thread Adam Wright
If you have shell access to the box, you can chgrp some stuff and allow PHP to write to it. Otherwise, you'll have to talk to the ISP directly (get them to setup setuid versions of common shell commands for this sort of requirement). There is no way to make PHP 'login', any as PHP is server side,

Re: [PHP] Generate Random Letters?

2001-03-09 Thread Adam Wright
I use something like... function randString($sequence_length = 7) $possible_letters = "abcdefghijklmnopqrstuvwxzy"; $sequence = "" while ($sequence_length--) { $sequence .= $possible_letters[rand(0, strlen($possible_letters) - 1)]; } return $sequence; } To create random strings.

Re: [PHP] GTK-PHP install doubt?

2001-03-08 Thread Adam Wright
Make sure you're building against a 4.0.5 build of PHP. I tried this afternoon with the latest PHP from snaps.php.net and the GTK bindings, and it worked flawlessly. adamw - Original Message - From: "Celestino Roberto Alejandro" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday,

Re: [PHP] Encoder price too high (was: Zend hit)

2001-01-25 Thread Adam Wright
We are working on extending the APC cache (http://apc.communityconnect.com) with an encoder, and already have a pretty much functioning version (though its a bit of hack job at the moment :). I think the patches we made were sent to the dev list, but I can send them around at request. adamw

Re: [PHP] Compiler? (Was Re: [PHP] PHP site on CD-ROM)

2001-01-25 Thread Adam Wright
The compiler has become the encoder, because it's rather hard to meet the expectations of a 'compiler' (many would expect it to produce binaries and heavily optimised code). Encoder makes more sense, based on what the product does. adamw - Original Message - From: "Angus Mann" [EMAIL

Re: [PHP] include statement

2001-01-17 Thread Adam Wright
This is because the PHP include statement is ment to include other blocks of PHP code, rather than bits of HTML. Hence, it includes things from anywhere on the system. To include things from under your current htdocs directory, use... include($DOCUMENT_ROOT . "/includes/metatags.include");

Re: [PHP] include statement

2001-01-17 Thread Adam Wright
, investigate "Safe mode" this instant :) adamw - Original Message - From: "Karl J. Stubsjoen" [EMAIL PROTECTED] To: "Adam Wright" [EMAIL PROTECTED]; [EMAIL PROTECTED]; "Michael Zornek" [EMAIL PROTECTED] Sent: Wednesday, January 17, 2001 5:21 PM Subject: R