|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Aug 23 2001 - 12:56:26 CDT
php-general Digest 23 Aug 2001 17:56:26 -0000 Issue 833
Topics (messages 64045 through 64139):
Sablotron and remote URI's
64045 by: Darron Froese
Re: who can give me a article about begining Regular expression?
64046 by: Pavel Jartsev
Scripts..flatfile
64047 by: ReDucTor
Re: imagemagick and file size
64048 by: Ben-Nes Michael
64055 by: Ben-Nes Michael
Re: Sorting IP Address Data
64049 by: David Robley
64052 by: Steve Edberg
64073 by: Tom Rogers
Re: Please Help - getting a hightlight depending on selected page
64050 by: Martin Hughes
Re: someone please explain weird getforeignkeys
64051 by: Caleb Carvalho
Re: Sorting IP Address Data (oops!)
64053 by: Steve Edberg
numrows
64054 by: Martin Kampherbeek
64056 by: Chris Fry
64057 by: Raphael Pirker
64061 by: Steve Brett
64063 by: Raphael Pirker
64064 by: Chris Fry
64065 by: Raphael Pirker
64066 by: Raphael Pirker
64076 by: Johannes Janson
64137 by: ERISEN, Mehmet Kamil
Re: force download in IE -- conclusion
64058 by: Tom Rogers
Re: Concept of Templates
64059 by: Navid Yar
Deny access without password to the web site
64060 by: Sunil Jagarlamudi
It's just a logo..
64062 by: Wisam
64067 by: Raphael Pirker
Re: How can I insert the data into the begining of a text file
64068 by: Christian Reiniger
File upload problem
64069 by: A.D. Vijverberg
64127 by: Sheridan Saint-Michel
Re: Mutiline read as Sigle Line!
64070 by: Justin French
Re: Script timeout
64071 by: Christian Reiniger
64080 by: Dave
64116 by: Johnson, Kirk
64129 by: Julian Wood
Re: HTTP headers and include()
64072 by: Christian Reiniger
I get "headers already sent by" error each time I use setcookie function
64074 by: Ha Minh NGUYEN
sybase on linux RH 7.1?
64075 by: Caleb Carvalho
php/mysql install on Win2k
64077 by: Wolfgang Schneider
Removing files from a directory
64078 by: Niklas Lampén
64081 by: Niklas Lampén
mcrypt trouble, still
64079 by: Dominic Schanen
Shell version of php
64082 by: Tom Carter
64083 by: Nick Davies
Re: Problems compiling with Apache 2.0 Alpha 22
64084 by: Mark Roedel
multiple select statement
64085 by: Natasha
64086 by: Hugh Bothwell
64093 by: Andrey Hristov
Re: The future of PHP
64087 by: Michael Kimsal
64092 by: Christopher CM Allen
64112 by: Kai Schaetzl
64117 by: Jeff Pearson
64118 by: Sean C. McCarthy
64119 by: Jeff Pearson
64122 by: scott [gts]
64135 by: Dave
64136 by: Thomas Deliduka
64139 by: Dave
upload binary using postgres
64088 by: Ben-Nes Michael
Need help to create HTML table with 2 columns.
64089 by: John Bass
64091 by: Jeff Lewis
64096 by: Markus Bertheau
64104 by: John Bass
64107 by: Jeff Lewis
64110 by: John Bass
OCI8 on PHP 4 Windows
64090 by: Ridai Govinda Pombo \(Engenharia BSB\)
64102 by: Andrey Hristov
conf file access on host server
64094 by: Diane Mulberry
64124 by: Diane Mulberry
64130 by: Andrey Hristov
Cannot index a string index - Why?
64095 by: torek
Grep Challenge 2001
64097 by: Sondra Russell
64114 by: Andrey Hristov
Any Functions !!
64098 by: Mark Lo
How to get the content of a file into the value of a text column
64099 by: Jack
Re: [PHP-WIN] How to get the content of a file into the value of a text column
64100 by: Angie Tollerson
always last
64101 by: Jeremy Morano
64113 by: Andrey Hristov
constant arrays or something like #define in c
64103 by: Gregor Maier
64109 by: Andrey Hristov
64115 by: Gregor Maier
64128 by: Andrey Hristov
Re: How to get the content of a file into the value of a t
64105 by: Gregor Maier
JPEG true color problems
64106 by: Jane Dennett-Thorpe
mail function
64108 by: Richard Baskett
64126 by: Gabe da Silveira
Re: register_globals odd behaviour?
64111 by: Sean C. McCarthy
Re: 2 NEWBIE QUESTIONS
64120 by: Yura
Re: strange error
64121 by: BRACK
64138 by: Dave
parse_url and cgi?
64123 by: Jaxon
Getting MySQL Query Times.
64125 by: Gabe da Silveira
64132 by: Andrey Hristov
64133 by: Nathan Cook
64134 by: Jon Haworth
PHP object orientation with "Application Frameworks" or "Foundati on Class Libraries"
64131 by: Orr, Steve
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
For some reason - this works just fine:
$processor = xslt_create();
xslt_run($processor, 'diary.xsl', 'test.xml');
print xslt_fetch_result($processor);
xslt_free($processor);
While this doesn't work at all:
$processor = xslt_create();
xslt_run($processor, 'diary.xsl', 'http://baby.froese.org/baby.xml');
print xslt_fetch_result($processor);
xslt_free($processor);
Fatal error: cannot read from URI 'http://baby.froese.org/baby.xml' in
/home/darron/public_html/baby/xslt.php on line 38
Can I not read from a remote URI?
I can segfault the server at will if I use fopen to work around that URI
problem:
<?php
$fp = fopen ("http://baby.froese.org/baby.xml", "r");
$xml = fread($fp, 10000000);
fclose ($fp);
$processor = xslt_create();
xslt_run($processor, 'diary.xsl', $xml);
print xslt_fetch_result($processor);
xslt_free($processor);
?>
[Wed Aug 22 23:02:00 2001] [notice] child pid 15248 exit signal Segmentation
fault (11)
[Wed Aug 22 23:02:01 2001] [notice] child pid 15246 exit signal Segmentation
fault (11)
Note - it segfaults until I comment out the xslt_run command.
Any ideas?
I tried to update to 4.0.7-cvs just now but for some reason I can't get it
to buildconf properly.
I'm running:
Linux 2.2.19
Mandrake 7.1
expat-1.95.2
Sablotron 0.65
I've got PHP 4.0.6 compiled and working properly with this configure script:
./configure \
--with-apxs=/usr/local/apache_1.3.19/bin/apxs \
--with-mysql=/usr/local/mysql-3.23.38 \
--with-pgsql=/usr/local/pgsql-7.1.2 \
--enable-ftp \
--with-curl \
--with-zlib \
--with-pspell \
--with-ldap \
--with-pdflib=/usr/local/pdflib-4 \
--with-imap=/usr/local/src/imap-4.5 \
--with-zlib-dir=/usr/lib \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-gd \
--with-ttf \
--with-t1lib \
--with-xml \
--with-swf=/usr/local \
--with-ming \
--with-sablot \
--with-xslt-sablot \
--with-expat-dir=/usr \
--with-java=/usr/local/jdk \
--with-gettext \
--with-mcrypt \
--with-mhash \
--enable-wddx \
--enable-sockets \
--enable-calendar \
--enable-trans-sid \
--enable-track-vars=yes \
--enable-magic-quotes=yes
Thanks.
-- darron froese new media technologist sutton javelin corporate communications t 403.716.0351 f 403.265.7662 e darronjavelindigital.com
attached mail follows:
liufeng wrote: > > thanks! > i want to learn Regular expression.
http://www.php.net/manual/en/pcre.pattern.syntax.php
-- Pavel a.k.a. Papi
attached mail follows:
Hello everyone, What scripts do you know of or have made that store all there information in a file(flatfile d/b), that use php, and will allow someone to setup a system for hosting these scripts(if its your script and you want your ads there, tell me), this is just so i can have a few examples, for stuff, they don't need to be top of the line...Please
btw. People to send a message to the address it came from and the mailing list address, use Reply to All, not reply to sender :D
- James "ReDucTor" Mitchell
attached mail follows:
Yep, I know. I just wrote the function as a general description.
thanks for the tip on strlen, thats what I need.
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 2:01 AM
Subject: [PHP] Re: imagemagick and file size
> > function example() { > > $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-"; > > return `$convert`; > > } > > > > the returned binary value is uploaded to the DB. > > > > My main problem is that I don't know how to measure the decreased image > size > > while its stored in the variable. > > Use http://php.net/strlen on your binary value. Use http://php.net/filesize > on your input file. > > Also, you either typed too fast, or you left out the global statement or > something. The code as posted won't work, unless backtick operates in > global space or something really weird... > -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
attached mail follows:
Hi Again
Strange but same command to return the $data or to save it to the HD returned diffrent data length
when the data returend to $data strlen($data) -> output 4075 while the saved file is -> 4252
Any one know why there is diffrence ?
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 2:01 AM
Subject: [PHP] Re: imagemagick and file size
> > function example() { > > $convert = "cat $userfile | /usr/X11R6/bin/convert - $type:-"; > > return `$convert`; > > } > > > > the returned binary value is uploaded to the DB. > > > > My main problem is that I don't know how to measure the decreased image > size > > while its stored in the variable. > > Use http://php.net/strlen on your binary value. Use http://php.net/filesize > on your input file.
-------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
attached mail follows:
On Thu, 23 Aug 2001 12:58, Chris Aitken wrote: > Hi all, > > Just a quick one, > > I am pulling a whole Class C list of IP addresses, and im trying to > sort them in order, but im getting it displayed > > 127.0.0.1 > 127.0.0.10 > 127.0.0.100 > 127.0.0.101 > 127.0.0.102 > > etc. Is there any other way to sort this thinking they are numbers, > rather than text ? > > > Thanks > > > Chris
Chris
Poke them in an array, and use asort() or sort()with the sortflag parameter set for numeric. I think that should work.
The optional second parameter sort_flags may be used to modify the sorting behavior using theese values: Sorting type flags: • SORT_REGULAR - compare items normally • SORT_NUMERIC - compare items numerically • SORT_STRING - compare items as strings
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA"I'm about to hit the golf ball," Tom forewarned.
attached mail follows:
And if the numbers are from different subnets, you could sort like so (assuming addresses are in a 1-dimensional array, here called $IpAddresses):
function sort_address($IpAddresses) { $List = array(); foreach ($IpAddresses as $A) { list($x,$y,$z,$t) = explode('.', $A); $List[($x*16777216) + ($y*6553616) + ($z*256) + $t] = $A; } ksort($List, SORT_NUMERIC); return array_values($List); }
My first thought was to use the line
$List[($x<<24) + ($y<<16) + ($z<<8) + $t] = $A;
instead, and gain a little speed advantage by bitshifting instead of multiplying, but then you'd need to force $x, $y, $z and $t to integers first. You might be able to do
$List[(((int)$x)<<24) + (((int)$y)<<16) + (((int)$z)<<8) + $t] = $A; or $List[(($x+0)<<24) + (($y x+0)<<16) + (($z x+0)<<8) + $t] = $A;
instead, though. If you wanted 'em in REVERSE order, use krsort() instead of ksort().
Usual 'untested code' warnings apply.
- steve
At 2:15 PM +1000 8/23/01, Chris Fry <chris
quillsoft.com.au> wrote:
>Chris,
>
>Understand the problem now.
>
>All you need to keep is the last octect of the IP Address.
>
>The following code snippet generates an array entry for each ip. The array is
>then sorted and the result prepended with the base IP.
>
><?
>$strBaseIP = "127.0.0.";
> for ($i=0;$i<=255;$i++) {
> $strIP = $i;
> print "IP = $strIP<br>";
> $aryIP[$i] = $strIP;
>}
>sort($aryIP);
>for ($i=0;$i<=255;$i++) {
> $strIP = $strBaseIP.$aryIP[$i];
> print "IP = $strIP<br>";
>}
>?>
>
>Pretty rough and ready but it should point you in the right direction.
>
>If you need to sort IP's from differnet subnets then you need to
>split the IP as
>per the previous suggestion.
>
>Chris
>
>Chris Aitken wrote:
>
>> Hi all,
>>
>> Just a quick one,
>>
>> I am pulling a whole Class C list of IP addresses, and im trying to sort
>> them in order, but im getting it displayed
>>
>> 127.0.0.1
>> 127.0.0.10
>> 127.0.0.100
>> 127.0.0.101
>> 127.0.0.102
>>
>> etc. Is there any other way to sort this thinking they are numbers, rather
>> than text ?
>>
>> Thanks
>>
>> Chris
>>
>> --
>> Chris Aitken - Administration/Database Designer - IDEAL Internet
>> email: chris
ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890
>> __-----------------------------------------__
>> *** Big Brother ***
>> It just shows that the dull will rule the world. And we will be watching it.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>--
>
>Chris Fry
>Quillsoft Pty Ltd
>Specialists in Secure Internet Services and E-Commerce Solutions
>10 Gray Street
>Kogarah
>NSW 2217
>Australia
>
>Phone: +61 2 9553 1691
>Fax: +61 2 9553 1692
>Mobile: 0419 414 323
>eMail: chris
quillsoft.com.au
>http://www.quillsoft.com.au
>
>You can download our Public CA Certificate from:-
>https://ca.secureanywhere.com/htdocs/cacert.crt
>
-- +------------------------ Open source questions? ------------------------+ | Steve Edberg University of California, Davis | | sbedbergucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+
attached mail follows:
one solution that works on all ip numbers <? $ip = array("192.168.132.3","192.168.132.2","0.0.0.1","192.168.132.4","192.168.1.1","192.168.0.1"); foreach($ip as $val){ $split = explode(".",$val); $num = (16777216 * $split[0]) + (65536 * $split[1]) + (256 * $split[2]) + $split[3]; $iplist["$num"] = $val; //quotes needed to force it into assoc type array (php4.0.4) } ksort($iplist,SORT_NUMERIC ); reset($iplist); foreach($iplist as $val){ echo $val."<br>"; } ?>
At 01:28 PM 23/08/01, Chris Aitken wrote:
>Hi all,
>
>Just a quick one,
>
>I am pulling a whole Class C list of IP addresses, and im trying to sort
>them in order, but im getting it displayed
>
>127.0.0.1
>127.0.0.10
>127.0.0.100
>127.0.0.101
>127.0.0.102
>
>etc. Is there any other way to sort this thinking they are numbers, rather
>than text ?
>
>
>Thanks
>
>
>Chris
>
>--
> Chris Aitken - Administration/Database Designer - IDEAL Internet
> email: chris
ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890
> __-----------------------------------------__
> *** Big Brother ***
>It just shows that the dull will rule the world. And we will be watching it.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Thanks everyone for the help!!!
Martin
attached mail follows:
Hi all,
I've just install php-4.0.6 in my linux machine, but am not familiar with the syntax,
How good is php in terms of managing database (sybase) data compare to Java? I mean to display on the web?
Thanks,
Caleb Carvalho Application Engineer Tier 1 CSO Europe LoadRunner/APM ----------------------------------------------------------------------------------------- Enterprise Testing and Performance Management Solutions ----------------------------------------------------------------------------------------- Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300
>From: "Richard Lynch" <ceo
l-i-e.com>
>To: <php-general
lists.php.net>
>Subject: [PHP] Re: someone please explain weird getforeignkeys
>Date: Wed, 22 Aug 2001 18:11:29 -0500
>
> > I need to look up a table's foreign keys using the unified
>ODBC-functions.
> > 'odbc_foreignkeys()' requires me to pass seven parameters, each of them
>being
> > mandatory, to archive this.
>
>Yes.
>
> > Because the approach is not intuitive anyhow and there is no
>documentation
> > available except of the PHP-manual's prototype, neither me nor my
>co-workers
> > have any idea of how to apply the function.
>
>There *IS* some explanatory text about what happens depending on which args
>you fill in.
>
>Presumably you use "" for any args you don't care to fill in.
>
> > The manual states that three of the arguments are superfluous, depending
>on
> > the application; but the prototype contradicts this, declaring them
>mandatory.
>
>Use "" on args you don't care about. The function doesn't need them, but
>PHP only allows leaving out arguments at the end of the list, not the
>middle, so the "optional" argument language feature was probably not all
>that useful.
>
> > Can anyone please point me to a working code example or provide one?
>
>That I can't do...
>
>As near as I can figure, the pk_qualifier and pk_owner, and fk_qualifier
>and
>fk_owner args are not needed? Or, perhaps, if you specify them, the result
>set is filtered down some way...
>
>Try calling it with "" for all the arguments you don't understand, and see
>what you get.
>
> > Btw, how are the inter-table relationships defined at all? I cannot
>think
>of
> > a way to determine foreign keys without complete knowledge of all joins
>and
> > subqueries potentially run against the database.
>
>When you CREATE a table, you can declare a given COLUMN as a "FOREIGN KEY".
>If you didn't do that, this function is pretty useless to you...
>
>PS If you do figure something out, contribute to the notes, eh?
>
>--
>WARNING richard
zend.com address is an endangered species -- Use
>ceo
l-i-e.com
>Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
>Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
And if the numbers are from different subnets, you could sort like so (assuming addresses are in a 1-dimensional array, here called $IpAddresses):
function sort_address($IpAddresses) { $List = array(); foreach ($IpAddresses as $A) { list($x,$y,$z,$t) = explode('.', $A); $List[($x*16777216) + ($y*6553616) + ($z*256) + $t] = $A; } ksort($List, SORT_NUMERIC); return array_values($List); }
My first thought was to use the line
$List[($x<<24) + ($y<<16) + ($z<<8) + $t] = $A;
instead, and gain a little speed advantage by bitshifting instead of multiplying, but then you'd need to force $x, $y, $z and $t to integers first. You might be able to do
$List[(((int)$x)<<24) + (((int)$y)<<16) + (((int)$z)<<8) + $t] = $A; or $List[(($x+0)<<24) + (($y+0)<<16) + (($z+0)<<8) + $t] = $A;
**************************************************************************** I MADE A BIT OF A CUT'N'PASTE ERROR IN THE LINE ABOVE IN MY PREVIOUS EMAIL! ****************************************************************************
instead, though. If you wanted 'em in REVERSE order, use krsort() instead of ksort().
Usual 'untested code' warnings apply.
- steve
-- +------------------------ Open source questions? ------------------------+ | Steve Edberg University of California, Davis | | sbedbergucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+
attached mail follows:
What's wrong with this? I get the error: Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site49/web/vragen/vragen.php on line 42
$query = "SELECT * FROM question WHERE answer<>'1' AND id>250 ORDER BY id DESC";
$result = MYSQL_QUERY($query);
$number = MYSQL_NUM_ROWS($result);
attached mail follows:
Should be ORDER BY ID, DESC
Chris
Martin Kampherbeek wrote:
> What's wrong with this? I get the error: Warning: Supplied argument is not a valid MySQL result resource in /home/sites/site49/web/vragen/vragen.php on line 42 > > $query = "SELECT * FROM question WHERE answer<>'1' AND id>250 ORDER BY id DESC"; > > $result = MYSQL_QUERY($query); > > $number = MYSQL_NUM_ROWS($result);
--Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia
Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chris
quillsoft.com.au http://www.quillsoft.com.au
You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt
**********************************************************************
This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so.
This notice should not be removed.
attached mail follows:
> $number = MYSQL_NUM_ROWS($result); $number = MYSQL_NUMROWS($result);
attached mail follows:
i'd have a look at the table structure.
also if you're using <> to denote inequality then use !=
both of the previous posts are incorrect
Steve
"Chris Fry" <chris
quillsoft.com.au> wrote in message
news:3B84BB39.4584E0B8
quillsoft.com.au...
> Should be ORDER BY ID, DESC
>
> Chris
>
> Martin Kampherbeek wrote:
>
> > What's wrong with this? I get the error: Warning: Supplied argument is
not a valid MySQL result resource in
/home/sites/site49/web/vragen/vragen.php on line 42
> >
> > $query = "SELECT * FROM question WHERE answer<>'1' AND id>250 ORDER BY
id DESC";
> >
> > $result = MYSQL_QUERY($query);
> >
> > $number = MYSQL_NUM_ROWS($result);
>
> --
>
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce Solutions
> 10 Gray Street
> Kogarah
> NSW 2217
> Australia
>
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: chris
quillsoft.com.au
> http://www.quillsoft.com.au
>
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
>
> **********************************************************************
>
> This information contains confidential information intended only for
> the use of the authorised recipient. If you are not an authorised
> recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit, store or act
> in reliance on this e-mail or any attachments, and should destroy all
> copies of them.
> This e-mail and any attachments may also contain copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this e-mail if
> you are authorised to do so.
>
> This notice should not be removed.
>
>
attached mail follows:
Hi Chris, FYI:
"Chris Fry" <chris
quillsoft.com.au> wrote in message
news:3B84BB39.4584E0B8
quillsoft.com.au...
> Should be ORDER BY ID, DESC
actually it shouldn't be this way, since DESC is an option of the ORDER BY command meaning DESC...
ORDER BY [column] [ASC | DESC] (ASC is default)
so the original code was correct
attached mail follows:
Sorry - it's late! "I knew that" he said.
Raphael Pirker wrote:
> Hi Chris,
> FYI:
>
> "Chris Fry" <chris
quillsoft.com.au> wrote in message
> news:3B84BB39.4584E0B8
quillsoft.com.au...
> > Should be ORDER BY ID, DESC
>
> actually it shouldn't be this way, since DESC is an option of the ORDER BY
> command meaning DESC...
>
> ORDER BY [column] [ASC | DESC] (ASC is default)
>
> so the original code was correct
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia
Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chris
quillsoft.com.au http://www.quillsoft.com.au
You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt
**********************************************************************
This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so.
This notice should not be removed.
attached mail follows:
hehe, I just figured that you can use both... with and without the '_'. sorry for messing this up. the one with the "_" is actually featured in the documentation, while my code keeps getting shorter over time because of lazyness :)
"Raphael Pirker" <raphaelp
nr1webresource.com> wrote in message
news:20010823083653.294.qmail
pb1.pair.com...
> > $number = MYSQL_NUM_ROWS($result);
> $number = MYSQL_NUMROWS($result);
>
>
>
>
>
>
attached mail follows:
better late than never :)
attached mail follows:
Hi,
>$query = "SELECT * FROM question WHERE answer<>'1' AND id>250 ORDER BY id DESC"; > >$result = MYSQL_QUERY($query);
add "or die(mysql_error())" see what MySQL doesn't like about the query.
cheers johannes
attached mail follows:
Hello, Chris, with all due respect, DESC is a reserved word for SQL. is english ORDER BY ID DESC meand sort by id in descending order.
Martin, your SQL seems to be fine. Are you sure that you are connected to your database. I have run the following SQL against my database SELECT * FROM users WHERE username <> '1' AND user_id < 250 ORDER BY user_id DESC and it returned back records. SO SQL syntax is fine.
--- Chris Fry <chris
quillsoft.com.au> wrote:
> Should be ORDER BY ID, DESC
>
> Chris
>
> Martin Kampherbeek wrote:
>
> > What's wrong with this? I get the error: Warning:
> Supplied argument is not a valid MySQL result resource in
> /home/sites/site49/web/vragen/vragen.php on line 42
> >
> > $query = "SELECT * FROM question WHERE answer<>'1' AND
> id>250 ORDER BY id DESC";
> >
> > $result = MYSQL_QUERY($query);
> >
> > $number = MYSQL_NUM_ROWS($result);
>
> --
>
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce
> Solutions
> 10 Gray Street
> Kogarah
> NSW 2217
> Australia
>
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: chris
quillsoft.com.au
> http://www.quillsoft.com.au
>
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
>
>
**********************************************************************
>
> This information contains confidential information
> intended only for
> the use of the authorised recipient. If you are not an
> authorised
> recipient of this e-mail, please contact Quillsoft Pty
> Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit,
> store or act
> in reliance on this e-mail or any attachments, and should
> destroy all
> copies of them.
> This e-mail and any attachments may also contain
> copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the
> views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this
> e-mail if
> you are authorised to do so.
>
> This notice should not be removed.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
===== Mehmet Erisen http://www.erisen.com
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Hi This is the way I force save prompt on .html files .....maybe useful (only tested on ie) looks wierd but it works :) <? if(isset($filename)): $headertxt = "Content-Disposition: attachment; filename=\"".$filename."\""; header("Content-Type: application/force-download");header($headertxt); include("/PathToFile/$filename"); endif; ?>
Tom
At 06:10 AM 23/08/01, David Minor wrote:
>I ran some tests of different header configurations of 6 browser/platform
>combinations to find out what worked and what didn't. I didn't cover all of
>the platforms available, just those that my user-base uses, so this isn't
>complete.
>
>combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7 for
>Mac 9.1. I tested all of these browsers using/not using 'attachment' in the
>Content-Disposition header. and also changed out the Content-Type header
>with 'application/octet-stream', 'application/download', and '*/*'.
>
>Here's the summary and what I did to make things work as well as possible.
>My goal is to prompt the user with a save-as dialog for an mp3 file.
>
>IE5.5 for Mac always uses the quicktime plugin to play the file no matter
>what the disposition or type is. (also no matter what the file extension
>is. Couldn't figure out how to trick it to download the file.)
>
>IE5.5 for Win98 would attempt to download the file if ("content-disposition:
>attachment; filename=....") attachment was there.
>
>All 3 of the Win98 browsers would do prompt with as few clicks as possible
>when content-type was "application/octet-stream". Therefore, I test in my
>script for the Mac users and give them "Content-type: application/downlaod"
>while I give other users "Content-Type: application/octet-stream". Of
>course, this doesn't help the IE5.5 Mac users who still have to use
>"Downlaod Link to Disk" routine to get a save-as prompt.
>
>Anyone who sees different ways this could be done, please respond.
>
>Here's my code:
>
>if (eregi("mac",$HTTP_USER_AGENT))
> $type = "application/download";
>else
> $type = "application/octet-stream";
>
>// stream file to user
>header("Content-Type: $type");
>header("Content-Disposition: attachment; filename=$filename");
>header("Content-Length: ".filesize($tmp_file));
>header("Content-Transfer-Encoding: binary");
>readfile($tmp_file);
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
But how? Are there any examples that I can take a look at somewhere? I would love to see some. I've always wondered about how the links work to trigger the template creation. Are there any samples or tutorials of that online? Usually all I see is how the templates are created, but nothing of how it is linked together in a link management system...
> Does the link itself send any > information someplace that tells the server what information is needed and > how it has to be performed or placed?
By definition, this must be true. (Short of some stupid JavaScript hack that would really suck...)
You'll have to design your system such that everything you need to build a page can be encompassed within that URL.
<< Hello everyone,
I have a simple question, and I hope I ask it correctly without any confusion. I want to build my own template scheme without using any 3rd party, ready-made freeware template codes. But I am confused about one thing. I am building a content driven website. The templates (such as html headers, footers, style sheets, etc) will be placed in text files and called in as includes, but the content will be placed in a database. The thing I'm confused about is the concept behind linking these articles together in a main TOC (table of contents) page. When one clicks on a topic from a main TOC page, how does the server know which article to pull from the database and place into a particular template? Does the link itself send any information someplace that tells the server what information is needed and how it has to be performed or placed?
I hope this doesn't sound too confusing. If anyone needs me to clear it up a bit more, please let me know and I'll try my best. For those of you who know what I'm talking about, what is the concept behind templates, especially the links to those templates? Thanks in advance... >>
attached mail follows:
Hello,
How do you let the entire web site be password protected and require a user to use a password when the password entry part is on a secure web server and the other part is on a regular http port.
For example when I type http://foo.com it will forward me to https://foo.com for the password part and then once the password is verified it will forward me back to http://foo.com/index.html or something.
Is there anyway to do this without cookies ? If you require cookies, do you need a cookie check on all the subdirectories as well or just somehow get away with it when you have it at the top level.
Thank You
Sunil
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Do you know What's a logo worth: PRICELESS.
Do you have a logo ?
Do you have what it takes to design one ? To do it in Flash ?
Do you heve what it takes to put it on your website ? on your stationery & Business card ? On literally hundreds of products ?
Do you have what it takes to make it 3D, ANIMATED & doesn't take AGES to download ?
Do you want me to take care of that for you ?
For examples, and pricing, Contact walsaleem
msn.com
Serving Individuals, Family crests, Small Businesses, Communities, Townships and Corporate America.
Don't get left behind. Get graphical.
Thank you.
attached mail follows:
> Do you know What's a logo worth: PRICELESS. so how come you're putting a price on it then?
> Do you have a logo ? you bet
> Do you have what it takes to design one ? To do it in Flash ? yup
> Do you heve what it takes to put it on your website ? on your stationery & Business card ? On literally hundreds of products ? hmmm, first of all it's "have".... and YES, I do have what it takes! (all it takes to put it on your site is NOTEPAD anyways :)
> Do you have what it takes to make it 3D, ANIMATED & doesn't take AGES to download? err, logos are supposed to be simple. Take a look at the best logos out there: Puma, Coca Cola, Nokia, Yahoo! - notice any 3D and animation??
> Do you want me to take care of that for you ? sure... :)
having said that, please don't post your ads in here. If you have a question, ask it. If you have an answer, post it. All the rest goes into the signature.
attached mail follows:
On Wednesday 22 August 2001 18:14, Zenith wrote: > I have try this but, PHP just overwrite the prevoius content, and write > the new message into the file. > But I want to INSERT the new message into the head of a file.
You actually have to read everything, insert the line, write everything. file() will come in handy for that.
If you need to do this insertion stuff often you propably should use a database (or simply append to the end instead of inserting at the beginning of the file)
> $fp = fopen ( > $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt", "r+" );
Especially here it would be perfectly fine to just append to the end of the file.
> fputs ( $fp, "\nDebug message from : $PHP_SELF at ".strftime("%T on
> %D")."\n" );
> fputs ( $fp, "$message\n\n" );
> fclose ( $fp );
>
> "Niklas lampén" <niklas.lampen
publico.fi> ?????
> news:NPEFKEPHNLKEPEOLHPKNIENPCCAA.niklas.lampen
publico.fi...
>
> > Use $fp = fopen($file, "r+");
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)Install once, run forever. Linux.
attached mail follows:
Hello there,
I am trying to create a form for uploading files to the local intranet. Therefore I created a form for uploading files as mentioned in the PHP manual. After submitting the form I want to copy the file to the intranet with as name the original name on the system of the client. The problem is that the file is not being uploaded... The code i have is:
<? if ($subactie == ""){ // File upload form showen echo "<form type='multipart/form-data' action='index.php?actie=formulieren&subactie=upload' method='post'> <input type='hidden' name='MAX_FILE_SIZE' value='100000' Upload dit bestand: <input name='userfile' type='file'><br> <input type='submit' value='Upload file'> </form>"; }
if ($subactie == "upload"){ // Upload the file if (!copy($userfile, $userfile_name)) { echo "error while uploading!"; } else { echo "file uploaded successful!"; } }
?>
The file I try to upload (c:\ws_ftp.log which I currently use as randomly selected testfile) does exist on the harddisk (selected via the browse button). When I execute the code I get the folowing output: "Warning: Unable to open 'C:\\WS_FTP.LOG' for reading: No such file or directory in /usr/local/www/intranet.lync.nl/test/service/srv_formulieren.php on line 13 error while uploading! "
I am sure I overlooked something, but can't find it. I hope someone can help me to find the problem.
Some additional information: The upload_tmp dir. is set to a temp directory in the root of the intranet root. The directory is owned by the same user as the php/apache server is running. This user has all rights on the directorys involved
Thank you all in advance.
Kind regards,
A.D. Vijverberg
dvijverberg
lync.nl
attached mail follows:
Change <Form type='multipart/form-data' To <Form enctype='multipart/form-data'
Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com
----- Original Message -----
From: "A.D. Vijverberg" <dvijverberg
lync.nl>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 4:31 AM
Subject: [PHP] File upload problem
> Hello there,
>
> I am trying to create a form for uploading files to the local intranet.
> Therefore I created a form for uploading files as mentioned in the PHP
> manual. After submitting the form I want to copy the file to the intranet
> with as name the original name on the system of the client. The problem is
> that the file is not being uploaded... The code i have is:
>
> <?
> if ($subactie == ""){
> // File upload form showen
> echo "<form type='multipart/form-data'
> action='index.php?actie=formulieren&subactie=upload' method='post'>
> <input type='hidden' name='MAX_FILE_SIZE' value='100000'
> Upload dit bestand: <input name='userfile'
> type='file'><br>
> <input type='submit' value='Upload file'>
> </form>";
> }
>
> if ($subactie == "upload"){
> // Upload the file
> if (!copy($userfile, $userfile_name)) {
> echo "error while uploading!"; }
> else {
> echo "file uploaded successful!";
> }
> }
>
> ?>
>
> The file I try to upload (c:\ws_ftp.log which I currently use as randomly
> selected testfile) does exist on the harddisk (selected via the browse
> button). When I execute the code I get the folowing output: "Warning:
Unable
> to open 'C:\\WS_FTP.LOG' for reading: No such file or directory in
> /usr/local/www/intranet.lync.nl/test/service/srv_formulieren.php on line
13
> error while uploading! "
>
> I am sure I overlooked something, but can't find it. I hope someone can
help
> me to find the problem.
>
> Some additional information: The upload_tmp dir. is set to a temp
directory
> in the root of the intranet root. The directory is owned by the same user
as
> the php/apache server is running. This user has all rights on the
directorys
> involved
>
> Thank you all in advance.
>
>
> Kind regards,
>
>
> A.D. Vijverberg
> dvijverberg
lync.nl
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Jack wrote:
> I want the browser could display exactly the same as the user input! even > the lines and format!
For a browser to display line breaks, a "new line" isn't enough, it needs a <BR> tag.
there is a function called nl2br() [new-line-to-break] which does this:
$text = [your file read in]; $htmlText = nl2br($text)
or something like that (haven't done it in ages!!)
Justin French
attached mail follows:
On Wednesday 22 August 2001 17:59, Julian Wood wrote: > I have a script which has to do a *lot* of work. In fact, it times out > after 300 seconds, but is only about half done at that point. So I > tried using set_time_limit(0) to no avail (php is *not* running in safe > mode). So next I tried this directive in the apache config file: > php_value max_execution_time 12000 (and various other values too). Now > this changed the value of the constant correctly as reported by > phpinfo(), but not as reported by get_cfg_var(max_execution_time), > which still reported the default 30s. Empirically, the script would > still time out at exactly 300 seconds, as before. So, any idea what is > going on? Why timeout at 300s instead of the 30s or the 12000s which > are the only two values reported? Any other workarounds? This is php > 4.0
Looks like some HTTP timeout, i.e. either Apache or the browser is getting bored. Try outputting something from time to time.
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)Install once, run forever. Linux.
attached mail follows:
flush is your friend
>-----Original Message-----
>From: Christian Reiniger [mailto:creinig
mayn.de]
>Sent: Thursday, August 23, 2001 5:42 AM
>To: Julian Wood; php-general
lists.php.net
>Subject: Re: [PHP] Script timeout
>
>
>On Wednesday 22 August 2001 17:59, Julian Wood wrote:
>> I have a script which has to do a *lot* of work. In fact, it times out
>> after 300 seconds, but is only about half done at that point. So I
>> tried using set_time_limit(0) to no avail (php is *not* running in safe
>> mode). So next I tried this directive in the apache config file:
>> php_value max_execution_time 12000 (and various other values too). Now
>> this changed the value of the constant correctly as reported by
>> phpinfo(), but not as reported by get_cfg_var(max_execution_time),
>> which still reported the default 30s. Empirically, the script would
>> still time out at exactly 300 seconds, as before. So, any idea what is
>> going on? Why timeout at 300s instead of the 30s or the 12000s which
>> are the only two values reported? Any other workarounds? This is php
>> 4.0
>
>Looks like some HTTP timeout, i.e. either Apache or the browser is
>getting bored. Try outputting something from time to time.
>
>--
>Christian Reiniger
>LGDC Webmaster (http://lgdc.sunsite.dk/)
>
>Install once, run forever. Linux.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
>Why timeout at 300s instead of the 30s or the 12000s which > > are the only two values reported? > > Looks like some HTTP timeout, i.e. either Apache or the browser is > getting bored. Try outputting something from time to time.
Can anybody point me to information on all the possible HTTP timeouts there are (Apache, browser, ???), or care to discuss it here? We occasionally see "timeouts" that are not due to PHP, and I'm wondering where they are coming from.
TIA
Kirk
attached mail follows:
Well just to follow up, Apache was the culprit. There is an Apache timeout directive that was set to 300 s that I somehow missed on my first glance.
The things that timeout, as far as I know, are PHP, Apache, and several commands within PHP (such as fsockopen()). The Apache directive is called Timeout, conveniently enough. It actually indicates the amount of time between successive TCP packet transmissions before a timeout occurs, which threw me for quite a loop. I could make a script which took 20 minutes to complete and get no timeouts anywhere, so I was convinced there was something wrong with my code. The difference was that this 20 min script outputted data along the way, so no timeouts ever occurred. The problem script didn't output anything until it was finished processing. Christian hit it on the nail. You can set the php timeout within the apache config file like so: php_value max_execution_time 120. This time is not real time, but the time the script actually gets access to cpu resources, or something like that. In my case, a setting of 30 was about 300 s.
I don't know if the browser itself will ever timeout as long as it makes the initial handshake.
J
On Thursday, August 23, 2001, at 09:43 AM, Johnson, Kirk wrote:
>
>> Why timeout at 300s instead of the 30s or the 12000s which
>>> are the only two values reported?
>>
>> Looks like some HTTP timeout, i.e. either Apache or the browser is
>> getting bored. Try outputting something from time to time.
>
> Can anybody point me to information on all the possible HTTP timeouts
> there
> are (Apache, browser, ???), or care to discuss it here? We occasionally
> see
> "timeouts" that are not due to PHP, and I'm wondering where they are
> coming
> from.
>
> TIA
>
> Kirk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- Julian WoodProgrammer/Analyst University of Calgary
attached mail follows:
On Thursday 23 August 2001 02:36, Casteele/ShadowLord wrote:
> Andy <ajh
vmei.acad.bg> wrote in article
> > See if is there some kind of echo before header()s, or HTML sent to > > browser. > > No, I've been extremely careful to avoid that. The following are the > two test files I've been using to try to solve this.. (sans the
> if( headers_sent ) { > $senthdrs = "Headers Sent"; > } else { > $senthdrs = "Headers not sent"; > }
does it make a difference if you use the proper function call syntax (i.e. ad the () brackets after headers_sent) ?
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)Install once, run forever. Linux.
attached mail follows:
Hi, I don't know why I get : "Warning: Cannot add header information - headers already sent by (output started at c:\windows\bureau\cookie1.php:2) in c:\windows\bureau\cookie1.php on line 6" message each time I use setcookie function.
The second line is : <?php I put <html> at the end of the file. Do you have any ideas ?
Thank you, Ha Minh NGUYEN
attached mail follows:
has any1 installed sybase on linux RH 7.1?
where can i get a good manual? am getting errors trying to ./startserver -f ./RUN_SYBASE
Caleb Carvalho Application Engineer Tier 1 CSO Europe LoadRunner/APM ----------------------------------------------------------------------------------------- Enterprise Testing and Performance Management Solutions ----------------------------------------------------------------------------------------- Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
Hi,
as a bit of a newbie with PHP and Win2k, I've succesfully installed and used php on my Win2k computer for testing web pages etc locally on my computer and not having to upload things to the server of my ISP. Everything runs fine ... so it seems. Today then, I just installed a mysql distribution under Win2K on my machine as well, which apparently also successfully installed because I can call up and start the mysql-nt server and have it running.
Now ... here comes my question ... Could someone help me with setting things up so I can use this MySQL to create a database and tables to use for a forum from one of my "virtual websites" (that is one of the websites I am testing and which has been assigned a "vitual host") ? Where do I assign a host name to the mysql server and user and password to simulate the "real" situation of later on? For example: The website is at www.domain01.de (my domain), and the MySQL runs on mail.domain02.com (my ISP's mail server, where he has the mysql server installed) and I want then to use the PHP/MySQL combination from the website to run a forum.
If someone could point me in the right direction and perhaps coach my along a little bit, I would greatly appreciate it ... perhaps better done off list. God bless you with His grace and peace Wolfgang
Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/
attached mail follows:
I'm trying to remove files from a directory. I have this code to do it:
This code is in a included file located at '/map/'. File including this code is located at '/'. Files to be removed are located at '/map/'.
$Handle = opendir('map/'); while ($file = readdir($Handle)) { if (substr($file, 0, 3) == "md_") { $split = explode("_", $file); if ((time() - $split[1]) > 300) { unlink($file); }; }; };
What this does is return a Internal Server Error! If add do unlink("map/".$file); it returns file not found. What to do? What is wrong?
Niklas Lampén
attached mail follows:
Solved it by myself. :)
unlink($file); needs to be *exact* address to the file to be unlinked like "/www/dir/map/$file".
Just in case if someone else meets this problem!
Niklas
-----Original Message-----
From: Niklas Lampén [mailto:niklas.lampen
publico.fi]
Sent: 23. elokuuta 2001 15:17
To: Php-General
Subject: [PHP] Removing files from a directory
I'm trying to remove files from a directory. I have this code to do it:
This code is in a included file located at '/map/'. File including this code is located at '/'. Files to be removed are located at '/map/'.
$Handle = opendir('map/'); while ($file = readdir($Handle)) { if (substr($file, 0, 3) == "md_") { $split = explode("_", $file); if ((time() - $split[1]) > 300) { unlink($file); }; }; };
What this does is return a Internal Server Error! If add do unlink("map/".$file); it returns file not found. What to do? What is wrong?
Niklas Lampén
attached mail follows:
Well, in response to my previous post and its reply, the server administrator tried reinstalling mcrypt and did the testing during the install and it all seemed to work for him there. However, I still get the error:
Warning: mcrypt module initialization failed
So, now my question is this. In the phpinfo file, all the ciphers and modes are listed fine and it shows that mcrypt is enabled. However, for the directives mcrypt.algorithms_dir and mcrypt.modes_dir, they have no local or master value. Is this something that needs to be set in phpinfo to point at the mcrypt installation? Thanks.
-- Dominic
attached mail follows:
Hi guys,
This arose trying to install php-egg, altho thats not what this msg is really about. For it to run I need to have "a shell version" running... what exactly is this and how do I go about installing it? I have php installed (I think) as a module.. and by my understanding this is necessary for certain functions to run.... can I have both co-existing? I guess what I want is a copy of php running completely separate to apache, ie as a standalone app......... any help much appreciated!!!
Tom Carter
attached mail follows:
Just compile it without the apache stuff on configure. Then you should have a working php executable in /usr/bin/. All you need to do then is php script.php or put the #!/usr/bin/php at the head of your scripts. (/usr/bin/php -q removes the http headers)
Nick. On Thu, 23 Aug 2001, Tom Carter wrote:
> Hi guys, > > This arose trying to install php-egg, altho thats not what this msg is > really about. For it to run I need to have "a shell version" running... > what exactly is this and how do I go about installing it? > I have php installed (I think) as a module.. and by my understanding this > is necessary for certain functions to run.... can I have both co-existing? > I guess what I want is a copy of php running completely separate to > apache, ie as a standalone app......... any help much appreciated!!! > > Tom Carter > > >
attached mail follows:
> -----Original Message-----
> From: The Doctor [mailto:doctor
doctor.nl2k.ab.ca]
> Sent: Wednesday, August 22, 2001 10:40 PM
> To: php-general
lists.php.net
> Subject: [PHP] Problems compiling with Apache 2.0 Alpha 22
>
>
> Can anyone explain what I am getting this?
>
> [snip]
>
> checking for Apache 2.0 module support via DSO through APXS...
>
> Usage: apxs -g [-S <var>=<val>] -n <modname>
> apxs -q [-S <var>=<val>] <query> ...
> apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
> [-I <incdir>] [-L <libdir>] [-l <libname>]
> [-Wc,<flags>]
> [-Wl,<flags>] <files> ...
> apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
> apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
>
> configure: error: Sorry, I cannot run apxs. Either you need
> to install Perl or you need to pass the absolute path of apxs
> by using --with-apxs2=/absolute/path/to/apxs
That looks exactly like the output I get when I run the apxs that came with Apache 1.3.20. Are you really *really* sure you're pointing to the right copy of apxs?
--- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell
attached mail follows:
hi,
i want to know how i can get all selected values of a multiple select statement using $HTTP_POST_VARS
thanks.
attached mail follows:
"Natasha" <voidcore
yahoo.co.in> wrote in message
news:998573804.43601
wwli.com...
> hi,
>
> i want to know how i can get all selected values of a multiple select
statement using $HTTP_POST_VARS
The name of your select must be an array, ie
<select name='myvar[]' multiple> <option>A <option>B <option>C </select>
If A and B are selected, you will get $myvar[0] = 'A' and $myvar[1] = 'B' (for example).
The safe way to enumerate the values is with foreach, ie
foreach($myvar as $val) { // do something with $val }
Hope this helps.
attached mail follows:
in HTML
<select name="availabilities[]" size=4 multiple class="tfld"> .... .... </select>
in PHP code
var_dump($HTTP_POST_VARS['availabilities'];
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Natasha" <voidcore
yahoo.co.in>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 4:36 PM
Subject: [PHP] multiple select statement
> hi,
>
> i want to know how i can get all selected values of a multiple select
statement using $HTTP_POST_VARS
>
> thanks.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Thomas Deliduka wrote:
> A little background... Skip to "THE JIST" if you wanna make this quick. > > I am on this webmaster's list where most of the people are fairly new > webmasters. They're just getting the hang of things. I am probably one of > the only advanced ones on there (not to toot my own horn really) and I'm one > of two who use PHP (the other is just learning.) > > I tout PHP and MySQL as awesome, which they are, but I don't say they're the > only technology out there. > > There is another guy, a kid, who is a major Java guy and he's BIG into XML > and JSP. > > Some guy on this list asked what a good dynamic web solution is, I > immediately chimed in and said PHP was great, free, and on most all linux > hosts. Told him how powerful it was and what could be done with it. > > This kid chimes in and says, something to the affect of that if the guy > wants to live in the past and not let his website go anywhere then he should > go with PHP but JSP is the wave of the future and it's more powerful, and > has the backing of the almighty Sun and the Open Source community (as if PHP > doesn't).
I may be offbase a bit, but I think straight servlet style is more 'wave of the future' than JSP. JSP was/is more of a marketing rebuttal to ASP than a solid approach to web page, in my experience. Knowing Java, JSP to servlets to whatver shouldn't be a huge leap, but I'm always wary of Java people who get really *excited* about JSP specifically. Again, my limited experience, it's cumbersome and slow.
http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html
Revisit that - the JSP stuff was by far the slowest of the bunch. Yes, a better JVM would help, but would a different JVM give a 200% speed increase (what's needed to put it side by side with PHP in terms of speed?).
> > THE JIST > > So, the jist is, what does PHP have to offer to the web in the future? I > think it's still a viable option that will be around for at least another > 6-7 years. This kid thinks it's shelf life is another 3. What do ya'll > think? > >
Personally, I'd like to see the Java integration in PHP get better (easier to set up, perhaps different architecture so it can run faster) so people wanting interaction with Java and PHP can integrate the two easier. That might help put these issues to rest more.
XML? I'm pretty sure there's more XML stuff available for Java than PHP - by XML stuff I mean libraries and routines predone that'll help speed development. More SOAP stuff is happening in Java than PHP right now, so they're 'ahead' in that respect.
At the end of the day, a language needs to be able to interact with a web server (or run as a standalone process on port 80!) to accept incoming data, process it, and send it back in some specific format (HTML, XML, etc.). Java can do this. PHP can do this. CF, ASP, Perl, Python, Ruby, TCL and others can do this.
To some extent I engage in the same kind of 'turf wars' of PHP v ASP, JSP, CF, etc. I've spent most of my time developing in PHP, so I have a vested interest to promote it as a viable answer to client problems. Someone who's done the same with JSP will no doubt react as this person does.
One of PHP's strengths is also a weakness, imo. Because there's no standard way of doing certain things, many ways to approach the same problem get developed - I'm thinking code routines, etc. With Sun and MS, although you can often come up with multiple ways of doing things, these companies (ime) propose a 'standard' way of doing things - even if its slow/cumbersome/inefficient, that's the way people will learn how to do stuff.
Tangential case-in-point: the new ASP.NET stuff - the "web forms" stuff - put in a value, put new tags in the form to specifiy what's required, what's not and other validation routines, and the server will automatically fill in the values if it needs to redisplay that form. It's just a damn templating system built-in - but those practices will be learned by a whole new set of ASP people in the coming months and years who will espouse it as the best/awesome/cool way of doing stuff. You couldn't really do good templating systems at all in ASP up until recently, so most people over there never knew what they were missing anyway!
We've developed our own internal templating system/logic flow that allows for this type of stuff to be developed about as quickly as the ASP.NET version (possibly a bit faster once you get the hang of it). But because it's not a 'standard' in the community, it will never be as widely adopted as the ASP templating system they are promoting.
<rant off>
So - what do I think about shelf-life? At least 3 years in its present form. I'd like to see PHP evolve to more of a standalone system to act as its own webserver - or have closer integration with Apache ala mod_perl. If either of those happen, imo, it'll be much longer than 3 years.
If someone could write a PHP -> Java bytecode compiler, PHP code could run on any JVM, any the whole point would be moot anyway. :)
The rebuttal to 3 years, of course, is "who knows what the hell will be happening in technology 3 years from now?". How many people in 1997 saw the internet as it ended up in 2000?
------------------------------ Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961
attached mail follows:
Greetings Php'ers: <2 cents> bahh to servelts-asp these are new kids on the block. Template this or that, it doesnt matter, most templates are for lazy peeps anyways :) , a solid base of people have been using phtml->php for years. It doesnt matter to me what the e-zines say about which is more robust or feature enhanced, php is tested and true! I have been using it for many years and have grown in my development as a writer as much as the source has changed. And with that I would trust a phper more than I would trust a servelt on my system.
Procedural Programming will never Die! </2 Cents>
Yes, yes I am a child of the 70's,
CCMA
attached mail follows:
> JSP is the wave of the future >
As was said two years ago about Java. Does anybody still know about Java? ;-)
Kai
--Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com IE-Center: http://ie5.de & http://msie.winware.org ClubWin - Help for Windows Users: http://www.clubwin.com
attached mail follows:
Probably the best response to him would be to point him to Sun's own survey results. I remember reading about they surveyed their own customers asking who used JSP and the results ended up being a VERY small percentage. If their own customers don't use them does it really bode well for them?
Jeff Pearson
> -----Original Message-----
> From: Thomas Deliduka [mailto:thomas
neweve.com]
> Sent: Wednesday, August 22, 2001 7:31 PM
> To: PHP List
> Subject: [PHP] The future of PHP
>
>
> A little background... Skip to "THE JIST" if you wanna make this quick.
>
> I am on this webmaster's list where most of the people are fairly new
> webmasters. They're just getting the hang of things. I am probably one of
> the only advanced ones on there (not to toot my own horn really)
> and I'm one
> of two who use PHP (the other is just learning.)
>
> I tout PHP and MySQL as awesome, which they are, but I don't say
> they're the
> only technology out there.
>
> There is another guy, a kid, who is a major Java guy and he's BIG into XML
> and JSP.
>
> Some guy on this list asked what a good dynamic web solution is, I
> immediately chimed in and said PHP was great, free, and on most all linux
> hosts. Told him how powerful it was and what could be done with it.
>
> This kid chimes in and says, something to the affect of that if the guy
> wants to live in the past and not let his website go anywhere
> then he should
> go with PHP but JSP is the wave of the future and it's more powerful, and
> has the backing of the almighty Sun and the Open Source community
> (as if PHP
> doesn't).
>
> THE JIST
>
> So, the jist is, what does PHP have to offer to the web in the future? I
> think it's still a viable option that will be around for at least another
> 6-7 years. This kid thinks it's shelf life is another 3. What do ya'll
> think?
>
> --
>
> Thomas Deliduka
> IT Manager
> -------------------------
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi,
Well you are not well informed then. Java is the most popular solution to big web sites with the need to have something fault tolerant and stable. If you look a lot of banks have not JSP or servlets but EJB which are transactional, persistant through connections, multithreaded and have all the power of Java Language (safety, security, sandboxing, etc). Containers like Weblogic are making good money out of this.
If you want to know if somebody is using Java, just visit www.javasoft.com or ask people like the group in charge of Tomcat (of the Apache group), XERCES or so at java.apache.org on the Jakarta project. Also Motorola and other companies are working hard to integrate Java into small devices set-top boxes and devices like that.
I guess that there are places to use PHP and others to use Java, you decide what will suit better your needs.
Sean C. McCarthy SCI, S.L.
Kai Schaetzl wrote:
>
> > JSP is the wave of the future
> >
>
> As was said two years ago about Java. Does anybody still know about
> Java? ;-)
>
> Kai
>
> --
>
> Kai Schätzl, Berlin, Germany
> Get your web at Conactive Internet Services: http://www.conactive.com
> IE-Center: http://ie5.de & http://msie.winware.org
> ClubWin - Help for Windows Users: http://www.clubwin.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Sorry,
Should have given specific information. The original article I read was from InfoWorld. It can be found at:
http://www.infoworld.com/articles/op/xml/01/07/09/010709opcringely.xml
Following is the excerpt from it:
Place in the Sun
Meanwhile the light finally dawned on archrival Sun Microsystems, as the company discovered the awful truth: Few developers use Java Server Pages (JSP). Rather, many use that quiet achiever, the ugly-duckling language Perl.
On its Solaris Developer Connection site, Sun posed the question, "What language do you use to develop Web-based client applications?" The responses went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent; Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8 percent; and other, 4.3 percent. Check it out for yourself at soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet.
Notice it even gives info on PHP use .... :-)
Hope this helps.
Jeff Pearson
> -----Original Message-----
> From: Thomas Deliduka [mailto:thomas
neweve.com]
> Sent: Wednesday, August 22, 2001 7:31 PM
> To: PHP List
> Subject: [PHP] The future of PHP
>
>
> A little background... Skip to "THE JIST" if you wanna make this quick.
>
> I am on this webmaster's list where most of the people are fairly new
> webmasters. They're just getting the hang of things. I am probably one of
> the only advanced ones on there (not to toot my own horn really)
> and I'm one
> of two who use PHP (the other is just learning.)
>
> I tout PHP and MySQL as awesome, which they are, but I don't say
> they're the
> only technology out there.
>
> There is another guy, a kid, who is a major Java guy and he's BIG into XML
> and JSP.
>
> Some guy on this list asked what a good dynamic web solution is, I
> immediately chimed in and said PHP was great, free, and on most all linux
> hosts. Told him how powerful it was and what could be done with it.
>
> This kid chimes in and says, something to the affect of that if the guy
> wants to live in the past and not let his website go anywhere
> then he should
> go with PHP but JSP is the wave of the future and it's more powerful, and
> has the backing of the almighty Sun and the Open Source community
> (as if PHP
> doesn't).
>
> THE JIST
>
> So, the jist is, what does PHP have to offer to the web in the future? I
> think it's still a viable option that will be around for at least another
> 6-7 years. This kid thinks it's shelf life is another 3. What do ya'll
> think?
>
> --
>
> Thomas Deliduka
> IT Manager
> -------------------------
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
:-)
for the type of sites that i develop (non-mission-critical, non-financial), i find PHP's simplicity and elegance more than offsets a lack of things like strong typing and a harshly BDSM compiler (and whatever else Java/JSP has that PHP doesn't)
for most websites out there, Java is probably overkill, and using it would complicate the task at hand... but as with everything in life, JSP/XML has it's place, and PHP has it's.
> -----Original Message-----
> From: smccarthy
fobos.ulpgc.es [mailto:smccarthy
fobos.ulpgc.es]On
> Subject: Re: [PHP] The future of PHP
>
> I guess that there are places to use PHP and others to use Java, you
> decide what will suit better your needs.
attached mail follows:
>On its Solaris Developer Connection site, Sun posed the question, "What >language do you use to develop Web-based client applications?" The responses >went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent; >Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8
Nothing against Linux, but certainly limiting PHP in that statement.
>percent; and other, 4.3 percent. Check it out for yourself at >soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet. > > > >Notice it even gives info on PHP use .... :-)
attached mail follows:
On 8/23/2001 11:59 AM this was written:
> On its Solaris Developer Connection site, Sun posed the question, "What > language do you use to develop Web-based client applications?" The responses > went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent; > Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8 > percent; and other, 4.3 percent. Check it out for yourself at > soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet. > > > > Notice it even gives info on PHP use .... :-)
He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
>He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.
And flash developers will claim that the only way to create a site is have the whole thing Flash and crap flying across the client screen all the time... Untill the modem access market drops below 50% of the users on the net... hard time convincing me that 100's of kb in Flash is worth it.
He obviously is sold on JSP... let him sink with his ship. PHP isn't going anywhere anytime soon... not while *nix boxes are still the most stable performers for web.
IMO of course ;)
Dave
attached mail follows:
Hi
Im using php to upload Binary data into bytea field in postgres DB. The problem is that when I query what I uploaded I discover that it hold only 13 characters and not the whole binary file
I tried manual insert more then 13 characters successfully. I tried to do addslashes($data);
but still :( $slashed_data = addslashes($data); $sql = "insert into files (image_id, bin_data, filename, filesize, filetype) values ('$image_id', '$slashed_data', '$new_name', '$filesize', '$filetype');";
I tried strlen($slashed_data); before the insert to be sure that that the binary is bigger then 13 characters and yes, its 4KB ( the tested file );
Any ideas ?
-------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
attached mail follows:
Hi All,
I am trying to generate a table with two columns. Each column should print 2 fields named image_link and web_url. Have spent over week looking documentations and trying different coding but nothing is working. Any help will be greatly appreciated.
<TABLE> <?php $query = "SELECT image_link, web_url FROM testdata"; $result = mysql_query ($query) or die ("Query Failed"); while ($row = mysql_fetch_object ($result)) { printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link, $row->web_url,$row->image_link, $row->web_url); } ?> </TABLE>
Regards,
John Bass
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
John,
Try this:
<TABLE> <?php $query = "SELECT image_link, web_url FROM testdata"; $result = mysql_query ($query) or die ("Query Failed"); while ($row = mysql_fetch_object ($result)) { printf ("<tr><TD>".$row->image_links."<br>".$row->web_url."</TD> <TD>".$row->image_link."<br>".$row->web_url."</tr>\n"); } ?> </TABLE>
----- Original Message -----
From: "John Bass" <php_mysql21
hotmail.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 10:30 AM
Subject: [PHP] Need help to create HTML table with 2 columns.
> Hi All,
>
> I am trying to generate a table with two columns. Each column should
print
> 2 fields named image_link and web_url. Have spent over week looking
> documentations and trying different coding but nothing is working. Any
help
> will be greatly appreciated.
>
> <TABLE>
> <?php
> $query = "SELECT image_link, web_url FROM testdata";
> $result = mysql_query ($query) or die ("Query Failed");
> while ($row = mysql_fetch_object ($result))
> {
> printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link,
> $row->web_url,$row->image_link, $row->web_url);
> }
> ?>
> </TABLE>
>
> Regards,
>
> John Bass
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
ho,
John Bass wrote: > printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link, ^^
You forgot to close the td tag, maybe your browser didnt display the table because of that.
Markus Bertheau
attached mail follows:
Hi,
Thank you for the email. I tried your code, but first column is printing image_link & web_url fields correctly and second column is repeating values of the first column.
Other records or rows are printing same way.
Regards,
John Bass
>From: "Jeff Lewis" <jeff
hyrum.net>
>Reply-To: "Jeff Lewis" <jeff
hyrum.net>
>To: "John Bass" <php_mysql21
hotmail.com>, <php-general
lists.php.net>
>Subject: Re: [PHP] Need help to create HTML table with 2 columns.
>Date: Thu, 23 Aug 2001 10:41:08 -0400
>
>John,
>
>Try this:
>
><TABLE>
><?php
>$query = "SELECT image_link, web_url FROM testdata";
>$result = mysql_query ($query) or die ("Query Failed");
>while ($row = mysql_fetch_object ($result))
> {
> printf ("<tr><TD>".$row->image_links."<br>".$row->web_url."</TD>
><TD>".$row->image_link."<br>".$row->web_url."</tr>\n");
> }
> ?>
> </TABLE>
>
>----- Original Message -----
>From: "John Bass" <php_mysql21
hotmail.com>
>To: <php-general
lists.php.net>
>Sent: Thursday, August 23, 2001 10:30 AM
>Subject: [PHP] Need help to create HTML table with 2 columns.
>
>
> > Hi All,
> >
> > I am trying to generate a table with two columns. Each column should
>print
> > 2 fields named image_link and web_url. Have spent over week looking
> > documentations and trying different coding but nothing is working. Any
>help
> > will be greatly appreciated.
> >
> > <TABLE>
> > <?php
> > $query = "SELECT image_link, web_url FROM testdata";
> > $result = mysql_query ($query) or die ("Query Failed");
> > while ($row = mysql_fetch_object ($result))
> > {
> > printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link,
> > $row->web_url,$row->image_link, $row->web_url);
> > }
> > ?>
> > </TABLE>
> >
> > Regards,
> >
> > John Bass
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
What did you want in the second column? I was just going by what you had listed below: $row->image_link, > > > $row->web_url,$row->image_link, $row->web_url);
Jeff
----- Original Message -----
From: "John Bass" <php_mysql21
hotmail.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 11:16 AM
Subject: Re: [PHP] Need help to create HTML table with 2 columns.
> Hi,
>
> Thank you for the email. I tried your code, but first column is printing
> image_link & web_url fields correctly and second column is repeating
values
> of the first column.
>
> Other records or rows are printing same way.
>
> Regards,
>
> John Bass
>
> >From: "Jeff Lewis" <jeff
hyrum.net>
> >Reply-To: "Jeff Lewis" <jeff
hyrum.net>
> >To: "John Bass" <php_mysql21
hotmail.com>, <php-general
lists.php.net>
> >Subject: Re: [PHP] Need help to create HTML table with 2 columns.
> >Date: Thu, 23 Aug 2001 10:41:08 -0400
> >
> >John,
> >
> >Try this:
> >
> ><TABLE>
> ><?php
> >$query = "SELECT image_link, web_url FROM testdata";
> >$result = mysql_query ($query) or die ("Query Failed");
> >while ($row = mysql_fetch_object ($result))
> > {
> > printf ("<tr><TD>".$row->image_links."<br>".$row->web_url."</TD>
> ><TD>".$row->image_link."<br>".$row->web_url."</tr>\n");
> > }
> > ?>
> > </TABLE>
> >
> >----- Original Message -----
> >From: "John Bass" <php_mysql21
hotmail.com>
> >To: <php-general
lists.php.net>
> >Sent: Thursday, August 23, 2001 10:30 AM
> >Subject: [PHP] Need help to create HTML table with 2 columns.
> >
> >
> > > Hi All,
> > >
> > > I am trying to generate a table with two columns. Each column should
> >print
> > > 2 fields named image_link and web_url. Have spent over week looking
> > > documentations and trying different coding but nothing is working.
Any
> >help
> > > will be greatly appreciated.
> > >
> > > <TABLE>
> > > <?php
> > > $query = "SELECT image_link, web_url FROM testdata";
> > > $result = mysql_query ($query) or die ("Query Failed");
> > > while ($row = mysql_fetch_object ($result))
> > > {
> > > printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link,
> > > $row->web_url,$row->image_link, $row->web_url);
> > > }
> > > ?>
> > > </TABLE>
> > >
> > > Regards,
> > >
> > > John Bass
> > >
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at
> >http://explorer.msn.com/intl.asp
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > >
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >For additional commands, e-mail: php-general-help
lists.php.net
> >To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
second column should print next record that was returned from the query.
Thanks.
John
>From: "Jeff Lewis" <jeff
hyrum.net>
>Reply-To: "Jeff Lewis" <jeff
hyrum.net>
>To: "John Bass" <php_mysql21
hotmail.com>, <php-general
lists.php.net>
>Subject: Re: [PHP] Need help to create HTML table with 2 columns.
>Date: Thu, 23 Aug 2001 11:29:36 -0400
>
>What did you want in the second column? I was just going by what you had
>listed below: $row->image_link,
> > > > $row->web_url,$row->image_link, $row->web_url);
>
>
>Jeff
>----- Original Message -----
>From: "John Bass" <php_mysql21
hotmail.com>
>To: <php-general
lists.php.net>
>Sent: Thursday, August 23, 2001 11:16 AM
>Subject: Re: [PHP] Need help to create HTML table with 2 columns.
>
>
> > Hi,
> >
> > Thank you for the email. I tried your code, but first column is
>printing
> > image_link & web_url fields correctly and second column is repeating
>values
> > of the first column.
> >
> > Other records or rows are printing same way.
> >
> > Regards,
> >
> > John Bass
> >
> > >From: "Jeff Lewis" <jeff
hyrum.net>
> > >Reply-To: "Jeff Lewis" <jeff
hyrum.net>
> > >To: "John Bass" <php_mysql21
hotmail.com>, <php-general
lists.php.net>
> > >Subject: Re: [PHP] Need help to create HTML table with 2 columns.
> > >Date: Thu, 23 Aug 2001 10:41:08 -0400
> > >
> > >John,
> > >
> > >Try this:
> > >
> > ><TABLE>
> > ><?php
> > >$query = "SELECT image_link, web_url FROM testdata";
> > >$result = mysql_query ($query) or die ("Query Failed");
> > >while ($row = mysql_fetch_object ($result))
> > > {
> > > printf ("<tr><TD>".$row->image_links."<br>".$row->web_url."</TD>
> > ><TD>".$row->image_link."<br>".$row->web_url."</tr>\n");
> > > }
> > > ?>
> > > </TABLE>
> > >
> > >----- Original Message -----
> > >From: "John Bass" <php_mysql21
hotmail.com>
> > >To: <php-general
lists.php.net>
> > >Sent: Thursday, August 23, 2001 10:30 AM
> > >Subject: [PHP] Need help to create HTML table with 2 columns.
> > >
> > >
> > > > Hi All,
> > > >
> > > > I am trying to generate a table with two columns. Each column
>should
> > >print
> > > > 2 fields named image_link and web_url. Have spent over week looking
> > > > documentations and trying different coding but nothing is working.
>Any
> > >help
> > > > will be greatly appreciated.
> > > >
> > > > <TABLE>
> > > > <?php
> > > > $query = "SELECT image_link, web_url FROM testdata";
> > > > $result = mysql_query ($query) or die ("Query Failed");
> > > > while ($row = mysql_fetch_object ($result))
> > > > {
> > > > printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n",
>$row->image_link,
> > > > $row->web_url,$row->image_link, $row->web_url);
> > > > }
> > > > ?>
> > > > </TABLE>
> > > >
> > > > Regards,
> > > >
> > > > John Bass
> > > >
> > > > _________________________________________________________________
> > > > Get your FREE download of MSN Explorer at
> > >http://explorer.msn.com/intl.asp
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
>php-list-admin
lists.php.net
> > > >
> > > >
> > > >
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > >For additional commands, e-mail: php-general-help
lists.php.net
> > >To contact the list administrators, e-mail:
>php-list-admin
lists.php.net
> > >
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
> >
>
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
attached mail follows:
I need to put on the php_oci8.dll to run.
My Platform:
Win2k Advanced Server IIS 5.0 PHP 4.0.6 as an CGI (php.exe)
The error it returns:
X-Powered-By: PHP/4.0.6 Content-type: text/html PHP Warning: Unable to load dynamic library 'C:\Inetpub\PHP\extensions\php_oci8.dll' - The specified procedure could not be found. in Unknown on line 0
Now it starts with a worse (I've copied again this dll): Warning: Unable to load dynamic library 'C:\Inetpub\PHP\extensions\php_oci8.dll' - Access is denied.
I'm mad to make it work... Today!!
Thanks,
Ridai Govinda
ridai
agenciaclick.com.br
+55 61 328 5871
attached mail follows:
PHP for Windows works under SYSTEM id. Check if SYSTEM have access to read(or any other privilege) to the OCI dll.
----- Original Message -----
From: "Ridai Govinda Pombo (Engenharia BSB)" <ridai
agenciaclick.com.br>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 5:33 PM
Subject: [PHP] OCI8 on PHP 4 Windows
I need to put on the php_oci8.dll to run.
My Platform:
Win2k Advanced Server IIS 5.0 PHP 4.0.6 as an CGI (php.exe)
The error it returns:
X-Powered-By: PHP/4.0.6 Content-type: text/html PHP Warning: Unable to load dynamic library 'C:\Inetpub\PHP\extensions\php_oci8.dll' - The specified procedure could not be found. in Unknown on line 0
Now it starts with a worse (I've copied again this dll): Warning: Unable to load dynamic library 'C:\Inetpub\PHP\extensions\php_oci8.dll' - Access is denied.
I'm mad to make it work... Today!!
Thanks,
Ridai Govinda
ridai
agenciaclick.com.br
+55 61 328 5871
attached mail follows:
hi, i'm a relative new comer to php and was wondering if someone could give me some advice on hosting. specifically, access to my own conf file, and whether this is entirely necessary. Does not having access to your own conf limit what you can do in php in any way? also, if you have compiler access on the server, does that mean you can install your own libraries, etc? I'm currently looking at www.gradwell.com and they seem pretty good. any advice? Thanks, Diane Mulberry
attached mail follows:
can no one help me?
"Diane Mulberry" <RAID
softarchitecture.net> wrote in message
news:20010823152846.22929.qmail
pb1.pair.com...
> hi,
> i'm a relative new comer to php and was wondering if someone could give me
> some advice on hosting. specifically, access to my own conf file, and
> whether this is entirely necessary. Does not having access to your own
conf
> limit what you can do in php in any way?
> also, if you have compiler access on the server, does that mean you can
> install your own libraries, etc?
> I'm currently looking at www.gradwell.com and they seem pretty good. any
> advice?
> Thanks,
> Diane Mulberry
>
>
attached mail follows:
Many conf variables can be setup at runtime. Just include(require) in every script setup.php
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Diane Mulberry" <RAID
softarchitecture.net>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 7:12 PM
Subject: [PHP] Re: conf file access on host server
> can no one help me?
>
> "Diane Mulberry" <RAID
softarchitecture.net> wrote in message
> news:20010823152846.22929.qmail
pb1.pair.com...
> > hi,
> > i'm a relative new comer to php and was wondering if someone could give
me
> > some advice on hosting. specifically, access to my own conf file, and
> > whether this is entirely necessary. Does not having access to your own
> conf
> > limit what you can do in php in any way?
> > also, if you have compiler access on the server, does that mean you can
> > install your own libraries, etc?
> > I'm currently looking at www.gradwell.com and they seem pretty good. any
> > advice?
> > Thanks,
> > Diane Mulberry
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
hi, is there an error in this script?:
if ($var){ $tmp = explode("<|>",$vars); for ($i = 0; $i < sizeof($tmp); $i++){ $struct[$i] = array(); $tmp2 = explode("<||>",$tmp[$i]); for ($j = 0; $j < sizeof($tmp2);$j++){ $struct[$i][$j] = explode("<|||>",$tmp2[$j]); } } }
$var is something like "heim<||>test<|||>test1_1<|||>test1_2<|>home<||>testing<|||>testing1_2<|||>t esting2_2"
Im getting the warning "Cannot index a string index" on line "$struct[$i][$j] = explode("<|||>",$tmp2[$j]);"
I've done similar things quite often, but this is the first time I get this warning. Any Ideas, Thanks Torek
attached mail follows:
Hello everyone!
Here's my grep challenge. Turn:
<!--begin variable: variable_blah--> blah blah blah blah blah blah blah blah
<!--begin variable: variable_blah2--> blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 blah 2
into: (variable_blah) (blah blah blah blah blah blah blah blah) (variable_blah2) (blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 )
Where the "blahs" (that are not part of the variable name) contain practically anything but the next comment "<!--begin variable:". Also the "blahs" maintain their \n and such (I just flattened those values out for demo purposes here).
I've tried:"/<!--begin variable:?([\w\s]*)-->([\w\s]*)/m", but that misses out on any punctuation and "/<!--begin variable:?([\w\s]*)-->(.*)/m" gives me some other weirdness-- it doesn't find anything at all for the second substring.
Any suggestions!
Thanks cowboys! Sondra
attached mail follows:
Try "/<!--begin variable:?([\w\s]*?)-->([\w\s]*?)/m"
the "?" will force PCRE to not be *greedy*. Look in the manual of PCRE for syntaxis.
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Sondra Russell" <sondra
sondra.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 5:32 PM
Subject: [PHP] Grep Challenge 2001
> Hello everyone!
>
> Here's my grep challenge. Turn:
>
> <!--begin variable: variable_blah-->
> blah blah
> blah blah
> blah blah
> blah blah
>
> <!--begin variable: variable_blah2-->
> blah 2 blah 2
> blah 2 blah 2
> blah 2 blah 2
> blah 2 blah 2
>
> into:
> (variable_blah) (blah blah blah blah blah blah blah blah)
> (variable_blah2) (blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 blah 2 )
>
> Where the "blahs" (that are not part of the variable name) contain
> practically anything but the next comment "<!--begin variable:".
> Also the "blahs" maintain their \n and such (I just flattened those
> values out for demo purposes here).
>
> I've tried:"/<!--begin variable:?([\w\s]*)-->([\w\s]*)/m", but that
> misses out on any punctuation and "/<!--begin
> variable:?([\w\s]*)-->(.*)/m" gives me some other weirdness-- it
> doesn't find anything at all for the second substring.
>
> Any suggestions!
>
> Thanks cowboys!
> Sondra
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi,
is there any PHP functions to create 3D object from the photo. if no, is there any software exists??
Thank you
Mark
attached mail follows:
Dear all Actually i'm trying to get the content of a file, and make it as a default value of a input text column. Is there anyway could do it?
Thx
jack
jack
nedcor.com
attached mail follows:
Jack, You just need to check out the fopen and fread functions on php.net/manual
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson
alliancetechnologies.net
>>> "Jack" <jack
nedcor.com> 08/23/0php-db
lists.php.net1 10:02AM >>>
Dear all
Actually i'm trying to get the content of a file, and make it as a default
value of a input text column.
Is there anyway could do it?
Thx
jack
jack
nedcor.com
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribelists.php.net For additional commands, e-mail: php-windows-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi, I need a little bit of help. My variable $team in the option block is always set to the last variable that is read....I would like it to contain the option that the user clicks.....Please help me!
My Select works properly
...
$result =
mysql_query($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result)) { $uid = $row['uid'] $team = $row['team'];
$option_block .= "<option value=\"$uid\">$team</option>"; }
$display_block = "
<FORM METHOD=\"post\" ACTION=\"show_makeapick.php\">
<P><strong>Team:</strong> <select name=\"uid\"> $option_block </select>
<INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Team\"></P> </form>
";
?>
<HTML> <HEAD> <TITLE>User Management: Modify a User</TITLE> </HEAD> <BODY> <h1>User Management</h1> <h2><em>Modify a User</em></h2> <P>Select a contact from the list below, to modify the user's record.</p>
<? echo "$display_block"; ?>
<p><a href="contact_menu3.php">Return to Main Menu</a></p>
</BODY> </HTML>
attached mail follows:
Use a counter when fetching from the DB if you use while the $counter=0; while(list(...)=mysql_fetch_array($res)){ $option_block .= '<option '.(($counter==0)? ' selected':'').'>'.$option.'</option>'; }
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Jeremy Morano" <jeremy
prepresshelp.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 6:10 PM
Subject: [PHP] always last
> Hi, I need a little bit of help.
> My variable $team in the option block is always set to the last variable
> that is read....I would like it to contain the option that the user
> clicks.....Please help me!
>
>
>
> My Select works properly
>
> ...
>
>
> $result =
mysql_query($sql,$connection) or die("Couldn't execute
query.");
>
>
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid']
> $team = $row['team'];
>
>
> $option_block .= "<option value=\"$uid\">$team</option>";
> }
>
> $display_block = "
>
> <FORM METHOD=\"post\" ACTION=\"show_makeapick.php\">
>
> <P><strong>Team:</strong>
> <select name=\"uid\">
> $option_block
> </select>
>
> <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this Team\"></P>
> </form>
>
> ";
>
> ?>
>
> <HTML>
> <HEAD>
> <TITLE>User Management: Modify a User</TITLE>
> </HEAD>
> <BODY>
> <h1>User Management</h1>
> <h2><em>Modify a User</em></h2>
> <P>Select a contact from the list below, to modify the user's record.</p>
>
> <? echo "$display_block"; ?>
>
> <p><a href="contact_menu3.php">Return to Main Menu</a></p>
>
> </BODY>
> </HTML>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi,
I'm looking for a way to get a constant array or something that is similiar to a #define XYZ abc in C.
I want to be able to do the following:
DEFINE SOMEHOW: abc as XYZ (like #define XYZ abc) where abc is an array. So that XYZ is replaced by abc.
so that I can use XYZ[key] in my php-code and that this translates to abc[key].
Or is there another possibility for this. I wouldn't mind if XYZ is not constant as long as can use XYZ instead of abc. Would it be possible to do such a thing with references?
Thanks for your help.
Gregor
----------------------------------
E-Mail: Gregor Maier <gregor.maier
newlogic.com>
Date: 23-Aug-2001
Time: 17:09:14
----------------------------------
attached mail follows:
You can use define in some main config file which is known by all scripts of the site. For example define ("SESSION_NAME","mysite_sid");
Where you want to use the array ${SESSION_NAME}=array('login'=>'scott',"password"=>"tiger","age"=>"25");
${SESSION_NAME}['login'] or ${SESSION_NAME}['age']
Hope this helps.
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Gregor Maier" <gregor.maier
newlogic.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 6:16 PM
Subject: [PHP] constant arrays or something like #define in c
> Hi,
>
> I'm looking for a way to get a constant array or something that is
similiar to
> a #define XYZ abc in C.
>
> I want to be able to do the following:
>
> DEFINE SOMEHOW: abc as XYZ (like #define XYZ abc) where abc is an
> array. So that XYZ is replaced by abc.
>
> so that I can use XYZ[key] in my php-code and that this translates to
abc[key].
>
> Or is there another possibility for this. I wouldn't mind if XYZ is not
> constant as long as can use XYZ instead of abc.
> Would it be possible to do such a thing with references?
>
> Thanks for your help.
>
> Gregor
>
> ----------------------------------
> E-Mail: Gregor Maier <gregor.maier
newlogic.com>
> Date: 23-Aug-2001
> Time: 17:09:14
> ----------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Unfortunaly that's not an option because I must be able to make the define in the code:
it should be like this: i have a script1.php and script2.php. both include a file template.php in my template.php file I use arrays that should have different names depending on the file that included them. I would then the use XYZ as the name of the array in template.php and in script1.php i would define XYZ as array1 and in script2.php i would define XYZ as array2.
but thanks for the tip.
On 23-Aug-2001 Andrey Hristov wrote:
> You can use define in some main config file which is known by all scripts
> of the site.
> For example
> define ("SESSION_NAME","mysite_sid");
>
> Where you want to use the array
> ${SESSION_NAME}=array('login'=>'scott',"password"=>"tiger","age"=>"25");
>
>
> ${SESSION_NAME}['login']
> or
> ${SESSION_NAME}['age']
>
>
>
> Hope this helps.
>
> Andrey Hristov
> IcyGEN Corporation
> http://www.icygen.com
> 99%
>
> ----- Original Message -----
> From: "Gregor Maier" <gregor.maier
newlogic.com>
> To: <php-general
lists.php.net>
> Sent: Thursday, August 23, 2001 6:16 PM
> Subject: [PHP] constant arrays or something like #define in c
>
>
>> Hi,
>>
>> I'm looking for a way to get a constant array or something that is
> similiar to
>> a #define XYZ abc in C.
>>
>> I want to be able to do the following:
>>
>> DEFINE SOMEHOW: abc as XYZ (like #define XYZ abc) where abc is an
>> array. So that XYZ is replaced by abc.
>>
>> so that I can use XYZ[key] in my php-code and that this translates to
> abc[key].
>>
>> Or is there another possibility for this. I wouldn't mind if XYZ is not
>> constant as long as can use XYZ instead of abc.
>> Would it be possible to do such a thing with references?
>>
>> Thanks for your help.
>>
>> Gregor
>>
>> ----------------------------------
>> E-Mail: Gregor Maier <gregor.maier
newlogic.com>
>> Date: 23-Aug-2001
>> Time: 17:09:14
>> ----------------------------------
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
----------------------------------
E-Mail: Gregor Maier <gregor.maier
newlogic.com>
Date: 23-Aug-2001
Time: 17:32:06
----------------------------------
attached mail follows:
Ok, the solution is : in script1.php define("ARRAY_NAME","array1"); in script2.php define("ARRAY_NAME","array2");
in template.php: ${ARRAY_NAME}['some_index'] I didn't tested this but think that it will work. If not post a message to think for other way.
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Gregor Maier" <gregor.maier
newlogic.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 6:37 PM
Subject: Re: [PHP] constant arrays or something like #define in c
> Unfortunaly that's not an option because I must be able to make the define
in
> the code:
>
> it should be like this:
> i have a script1.php and script2.php. both include a file template.php
> in my template.php file I use arrays that should have different names
depending
> on the file that included them.
> I would then the use XYZ as the name of the array in template.php and in
> script1.php i would define XYZ as array1 and in
> script2.php i would define XYZ as array2.
>
> but thanks for the tip.
>
> On 23-Aug-2001 Andrey Hristov wrote:
> > You can use define in some main config file which is known by all
scripts
> > of the site.
> > For example
> > define ("SESSION_NAME","mysite_sid");
> >
> > Where you want to use the array
> > ${SESSION_NAME}=array('login'=>'scott',"password"=>"tiger","age"=>"25");
> >
> >
> > ${SESSION_NAME}['login']
> > or
> > ${SESSION_NAME}['age']
> >
> >
> >
> > Hope this helps.
> >
> > Andrey Hristov
> > IcyGEN Corporation
> > http://www.icygen.com
> > 99%
> >
> > ----- Original Message -----
> > From: "Gregor Maier" <gregor.maier
newlogic.com>
> > To: <php-general
lists.php.net>
> > Sent: Thursday, August 23, 2001 6:16 PM
> > Subject: [PHP] constant arrays or something like #define in c
> >
> >
> >> Hi,
> >>
> >> I'm looking for a way to get a constant array or something that is
> > similiar to
> >> a #define XYZ abc in C.
> >>
> >> I want to be able to do the following:
> >>
> >> DEFINE SOMEHOW: abc as XYZ (like #define XYZ abc) where abc is an
> >> array. So that XYZ is replaced by abc.
> >>
> >> so that I can use XYZ[key] in my php-code and that this translates to
> > abc[key].
> >>
> >> Or is there another possibility for this. I wouldn't mind if XYZ is not
> >> constant as long as can use XYZ instead of abc.
> >> Would it be possible to do such a thing with references?
> >>
> >> Thanks for your help.
> >>
> >> Gregor
> >>
> >> ----------------------------------
> >> E-Mail: Gregor Maier <gregor.maier
newlogic.com>
> >> Date: 23-Aug-2001
> >> Time: 17:09:14
> >> ----------------------------------
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >> For additional commands, e-mail: php-general-help
lists.php.net
> >> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> >>
> >>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
> ----------------------------------
> E-Mail: Gregor Maier <gregor.maier
newlogic.com>
> Date: 23-Aug-2001
> Time: 17:32:06
> ----------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
On 23-Aug-2001 Jack wrote:
> Dear all
> Actually i'm trying to get the content of a file, and make it as a default
> value of a input text column.
> Is there anyway could do it?
>
> Thx
> jack
> jack
nedcor.com
open the file an read it. save the contents to a string.
then use: <input name="some_field" type="text" value="<?php echo($string); ?>" />
----------------------------------
E-Mail: Gregor Maier <gregor.maier
newlogic.com>
Date: 23-Aug-2001
Time: 17:16:44
----------------------------------
attached mail follows:
Hello,
I'm trying to make some thumbnails from some JPEG true color images. I have PHP version 4.0.4, and when i try imagecreatefromjpeg($image) on these images, it doesn't happen.
After hours of head-beating i've realised that the problem is truecolor (it works if i open an image editor and save as a palette image then try again...)
I'm not in a position to install 4.0.6, so please can anyone tell me how i do this? I'm happy that my orignals should remain ture color - i just need a way of making thumbs. (can't use imagemagick as runningnin safe mode --> have no access to system calls)
thanks in advance, jane
attached mail follows:
I am trying to get the mail function to return anything that tells me that it was sent successfully or at least there were no errors, but assigning a variable to equal the mail function does not seem to return anything... On php's site it says it should return true. Am I going about this wrong?
Quite confused! :)
Rick
attached mail follows:
There are not a lot of guarantees. A big part of the problem is that you can't get instant feedback. Your mail server may queue the message and not even send it right away, or it could get sent, and your mail server doesn't find out for several minutes while the message goes out on the 'net and eventually bounces because the address is bad. There is probably a way you can get your mail server to inform you when a message fails to get delivered, but beyond that you probably can't do much.
In article <B7AA6E90.70DE%rickbaskett
home.com>,
rickbaskett
home.com (Richard Baskett) wrote:
> I am trying to get the mail function to return anything that tells me that > it was sent successfully or at least there were no errors, but assigning a > variable to equal the mail function does not seem to return anything... On > php's site it says it should return true. Am I going about this wrong? > > Quite confused! :) > > Rick >
-- __________________________________ Gabe da Silveira, Web Designer Twin Cities Student Unions University of Minnesota http://www.coffman.umn.eduwFone: (612)624-7270 eMail: jiblet
visi.com hPage: http://www.visi.com/~jiblet
attached mail follows:
Hi,
Actually is what I do but since register global is off, I do:
# Beginning of script: session_start(); session_register('count'); $sess_object->count = $HTTP_SESSION_VARS['count']; . . . # In your class methods: class ...
var $count function ... # global $count; not needed anymore $count++; . . } } . . . # At the end of your script. # Nothing. $count is your variable, it's registered, coo coo ka choo $HTTP_SESSION_VARS['count'] = $sess_object->count; # This is actually inside a function ?>
I do not know if this is bad because the way $HTTP_SESSION_VARS[] is designed or what. Just wanted to know if there is some real problem like references or some problem that would cause data missing or becoming corrupt. Thanks.
Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
Richard Lynch wrote:
>
> > What is the reason that I should not use the array? Is there any problem
> > doing it that way?
>
> They array is simply not designed for you to use as if it were your
> variable.
>
> What you want to do is this:
>
> <?php
> # Beginning of script:
> session_start();
> session_register('count');
> $count = $HTTP_SESSION_VARS['count'];
> .
> .
> .
> # In your class methods:
> class ...
> function ...
> global $count;
> }
> }
> .
> .
> .
> # At the end of your script.
> # Nothing. $count is your variable, it's registered, coo coo ka choo
> ?>
>
> You are changing $HTTP_SESSION_VARS['count'], but I'm betting the *GLOBAL*
> variable $count is not changing, and *THAT* is what was registered, and
> *THAT* is what gets save. $count in the global name-space.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
On 23 Aug 2001, at 0:16, Georgie wrote:
> 1) Is there any PHP command that'll convert a MySQL database timestamp into > a format that humans can read?!! For example, I want to change > "20010822001245" into "00:12.45 on the 22-08-2001"?
I believe all previous replies on this qwestion were good for you;
> 2) This is the hard question. I have a script that gets values from a > database and then includes a php page which contains "echo $variable" code > to get the values from the database onto the page. > > What I want to do is have the PHP page code in the main script instead of > being included externally. So i tried putting the code into a variable and > then including, but it didnt work. Then I tried echoing the variable but the > PHP code isnt executed.
Try to copy everything that is in your included php page except for "<?php" and "?>" other words everything that is between "<?php" and "?>" and replace your "include()" statement in the main script with what you just copied. But I don't really understand why do you want to put it in the main script, I would rather live it outside.
Youri <>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org
attached mail follows:
if you have structure like <html> <?php if (isset(...)){ ...; } elseif (isset()){ } else { ... ?> </html> then you need to insert "}" before "</html> or if you use syntax <html> <?php if (isset()): ...; elseif (isset()): ...; else: ...; ?> </html> you have to insert "endif;" If you think you did it but still have an error, try to count your "if" statements and "endif;" maybe something is missing.
Youri
attached mail follows:
>if you have structure like ><html> ><?php >if (isset(...)){ >...; >} [...] >?> ></html> >you have to insert "endif;" >If you think you did it but still have an error, try to count your "if" >statements and "endif;" maybe something is missing.
This is a matter of personal preference, but use formatting that is helpful to determine where you are in your code... and comment yourself... it will avoid missing } { and other common erors that eat up valuable time tracking down. HTML cares less about the extra spaces and \n's anyway
<?PHP while(something){ if(something){ doing something }else{ doing something else } #endif } #endwhile ?>
While generally restrictive in nature, some good ideas for policing your own code can be found at http://utvikler.start.no/code/php_coding_standard.html (just one copy I came across). take what you need out of there... once you stick to a method, your occasions of tracking down loose ends will drop greatly.
Dave
attached mail follows:
can someone answer the question - does parse_url in fact NOT work when using PHP as a cgi? i'm unable to make it work, and getting different answers from my isp, etc.
cheers, jaxon
attached mail follows:
I was looking thru the mysql functions, and there doesn't seem to be one that gives you the amount of time a query takes. Is there anyway to get this information (since it gives it to you when you type queries directly into the mysql shell client)? A script of mine is starting to get fairly slow (2-3 seconds for page to process) and I want to be able to log the query speeds so I can see if there's a database bottleneck or if my code is just kludgy.
-- __________________________________ Gabe da Silveira, Web Designer Twin Cities Student Unions University of Minnesota http://www.coffman.umn.eduwFone: (612)624-7270 eMail: jiblet
visi.com hPage: http://www.visi.com/~jiblet
attached mail follows:
Use microtime before and after the query. $this->starttime=explode(' ',microtime()); // query() $this->endtime=explode(' ',microtime()); $this->starttime=$this->starttime[1]+$this->starttime[0]; $this->endtime=$this->endtime[1]+$this->endtime[0]; $this->parse_time=$this->endtime-$this->starttime;
I've copied from working code of a class. But the idea is clear.This way is better than time() solutuion because with microtime() you get microseconds. But have in mind that on windows there are some problems with microtime() and the reported time can be negative.
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Gabe da Silveira" <jiblet
visi.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 7:22 PM
Subject: [PHP] Getting MySQL Query Times.
> I was looking thru the mysql functions, and there doesn't seem to be one
> that gives you the amount of time a query takes. Is there anyway to get
> this information (since it gives it to you when you type queries
> directly into the mysql shell client)? A script of mine is starting to
> get fairly slow (2-3 seconds for page to process) and I want to be able
> to log the query speeds so I can see if there's a database bottleneck or
> if my code is just kludgy.
>
> --
> __________________________________
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: jiblet
visi.com
> hPage: http://www.visi.com/~jiblet
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
IMO, you are better off printing microtime [http://www.php.net/manual/en/function.microtime.php] before and after the query, and after you loop through it. This will give you a better idea of where the hangups may be. You may also want to sprinkle mircotimes throughout your code to get a good idea of processing time.
Nathan Cook
ncook
pcsedu.com
----- Original Message -----
From: "Gabe da Silveira" <jiblet
visi.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 23, 2001 10:22 AM
Subject: [PHP] Getting MySQL Query Times.
> I was looking thru the mysql functions, and there doesn't seem to be one
> that gives you the amount of time a query takes. Is there anyway to get
> this information (since it gives it to you when you type queries
> directly into the mysql shell client)? A script of mine is starting to
> get fairly slow (2-3 seconds for page to process) and I want to be able
> to log the query speeds so I can see if there's a database bottleneck or
> if my code is just kludgy.
>
> --
> __________________________________
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: jiblet
visi.com
> hPage: http://www.visi.com/~jiblet
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
> I was looking thru the mysql functions, and there doesn't seem to be one > that gives you the amount of time a query takes. Is there anyway to get > this information (since it gives it to you when you type queries > directly into the mysql shell client)? A script of mine is starting to > get fairly slow (2-3 seconds for page to process) and I want to be able > to log the query speeds so I can see if there's a database bottleneck or > if my code is just kludgy.
I don't know if there's an actual function for it (although I wouldn't be surprised, knowing PHP :-), but you could definitely do something like:
$start = mktime(); $sql = "SELECT foo FROM bar ORDER BY xyzzy"; $result = mysql_query ($sql); // do something with the result if you want that timed as well $end = mktime(); $total = $end - $start; echo $total; // could format this using date() if you fancy
HTH Jon
attached mail follows:
PHP Wizzards,
I'm a PHP newbie but I think I'm falling in love... or at least becoming infatuated with PHP. I'm contemplating a significant PHP development effort on a toolset for Oracle DBA's and I want to architect wisely.
Based on prior object oriented development experience with PowerBuilder I think starting with a good framework is very important. What kind of PHP application development frameworks, class libraries, or templates are available and what do you recommend? Is SiteManager any good? How about phplib? Are there others? Any comments on PHP object orientation?
AtDhVaAnNkCsE, Steve Orr
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]