php-general Digest 30 Dec 2002 15:34:19 -0000 Issue 1793
Topics (messages 129623 through 129672):
Re: Dropping Tables
129623 by: Steve Buehler
Re: imap_set_quota function
129624 by: Michael Sims
Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43
129625 by: Davy Obdam
Re: Problem with REQUIRE in PHP 4.3.0
129626 by: Bc. Radek Krejca
Clear file or write to file erasing all old content
129627 by: Noodle Snacks
129628 by: jason perkins
129629 by: Noodle Snacks
PHP and XML parser (expat)
129630 by: Lasse Tarp
HTML module problem under Linux/APache2.0
129631 by: Tiziano Crimella
129632 by: Leif K-Brooks
129633 by: Tiziano Crimella
129634 by: Jason k Larson
Auto_incerement value
129635 by: Cesar Aracena
129636 by: Jason k Larson
129637 by: Rick Widmer
Serializing a DOM object
129638 by: Boget, Chris
PHP & PostgreSQL
129639 by: Boget, Chris
129640 by: Jason Wong
129643 by: Boget, Chris
129644 by: Jason Wong
129645 by: Rick Widmer
129647 by: Rick Widmer
129648 by: Jason Wong
129650 by: Boget, Chris
129654 by: Boget, Chris
129657 by: Michael Sims
129658 by: Boget, Chris
129660 by: Michael Sims
129663 by: Jason Wong
129665 by: Boget, Chris
129668 by: Jason Wong
129670 by: Boget, Chris
Zerofill
129641 by: Cesar Aracena
129642 by: Jason k Larson
129649 by: Rudolf Visagie
usort crashes
129646 by: CeeGee
Text repeating problem
129651 by: Simon Hay
129666 by: Rasmus Lerdorf
install problem
129652 by: gnu_is_not_unix.wp.pl
129661 by: Rasmus Lerdorf
help-regarding installation
129653 by: celia rexselin
function misfunction
129655 by: Martin S
129659 by: Michael Sims
129669 by: Jason Wong
Multi Language support
129656 by: Michael J. Pawlowsky
creating a .doc file in php
129662 by: Edward Peloke
129664 by: Marco Tabini
129672 by: Edward Peloke
Re: include "problem" -- how to use an external 'template' file and still use PHP
variables?
129667 by: Daevid Vincent
importing array from flash, how does PHP handle it?
129671 by: Gav
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Thank You so much John and Michael. SHOW TABLES LIKE 'a%' worked like a
charm and was exactly what I was looking for. I guess my searches were
using the wrong keywords. Kind of figures. Some of my searches were
turning up 1000's of results.
How do you know whether it's an "active" a* table or not? Will you be
dropping a table that someone is actually using?
I will be shutting down the script at a certain time each day to run some
things like this for maintenance. So none of these should be active and if
they are, it won't hurt anything. The customer can just wait until the
maintenance time is over. Approximately 10 mintues.
At 10:21 PM 12/29/2002 -0500, you wrote:
> Basically just do a a php script the sends the sql "show tables";
>
> Then do a strchr() to see if "a" is the first letter in the resuts and
if
> so do a delete table.
>
> Just yo play safe do a dump of your db first.
Or even better, use SHOW TABLES LIKE 'a%' to just get the a* tables and
drop each one.
How do you know whether it's an "active" a* table or not? Will you be
dropping a table that someone is actually using?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3
--- End Message ---
--- Begin Message ---
On Sun, 29 Dec 2002 18:26:01 -0800 (PST), you wrote:
>"This function requires the imap_stream to have been opened as the mail
>administrator account. It will not work if opened as any other user.
[...]
>my question is, where do i set this admin called 'mailadmin' with password
>'password'. do i set it in courier/uw for example?
Yes, you need to give imap_set_quota() a username and password of an
account that has administrator privileges on your IMAP server. If you
were using Cyrus IMAP you'd use an account that's specified in the
"admins" section of /etc/imapd.conf. I don't know how this is handled
in Courier or UW, but I assume the mechanisms are similar. I suggest
checking the documentation for your particular IMAP server...
--- End Message ---
--- Begin Message ---
Hi Rui,
I have Windows XP, Apache 2.0.43 and PHP 4.3.0 also. My php_domxml.dll
extension works just fine. Did u copy all files from c:\php\dlls to your
c:\WINDOWS\system32 directory? Also is your extensions path is set to
c:\php\extensions in your php.ini file? I hope that works.
Best regards,
Davy Obdam
mailto:[EMAIL PROTECTED]
Rui Costa wrote:
hi,
Windows XP, Apache 2.0.43(Win32) with PHP 4.3 can't load DLL
'php_domxml.dll'.
it pops-up: Unknown(): unable to load dll'C:\php\extensions\php_domxml.dll'
if I use the old 'php_domxml.dll' from PHP 4.2.4, it works fine. I'm using
libxml2-2.4.30, expat 1.95.4.
by the way, 'libxml2.dll' is not packed in the PHP 4.3 Windows distribution,
although it mentions that it does in the PHP documentation.
thanks in advance
rui
--- End Message ---
--- Begin Message ---
Hello,
no, I didn't try it. But I compile all versions before and no
problem. And I have computer with very similar configuration - work.
On machine with OpenBSD 3.0 PHP 4.3.0 works, on machines with BSD
3.1 not but I don't know why. What I may check?
g> You could try adding the path of the grab_globals.lib.php (or that of all of
g> all the lib files) in the php.ini file in the directive include_path like
g> this :
g> include_path =
g> ".:/usr/local/lib/php:/some/other/path:/absoute/path/to/your/lib/dir"
g> I dont yet have PHP 4.3.0 so this is from ver 4.0.6
Thanks
Radek
--- End Message ---
--- Begin Message ---
I can't seem to figure out how to write to a file deleting the old content.
Sorry I can't find which function/functions to RTFM
--- End Message ---
--- Begin Message ---
on 12/30/02 at 6:02 PM, Noodle Snacks <[EMAIL PROTECTED]> wrote:
> I can't seem to figure out how to write to a file deleting the old content.
> Sorry I can't find which function/functions to RTFM
It's specified with the mode parameter in the fopen function:
<http://www.php.net/manual/en/function.fopen.php>
--
Jason Perkins
url -> <http://www.somebodydial911.com/>
--- End Message ---
--- Begin Message ---
Thanks,
Its just one of those things I miss sometimes...
"Jason Perkins" <[EMAIL PROTECTED]> wrote in message
news:r01050400-1023-A17E17A81BC511D7B4D4000393D5F61C@[192.168.1.3]...
> on 12/30/02 at 6:02 PM, Noodle Snacks <[EMAIL PROTECTED]> wrote:
>
>
> > I can't seem to figure out how to write to a file deleting the old
content.
> > Sorry I can't find which function/functions to RTFM
>
> It's specified with the mode parameter in the fopen function:
>
> <http://www.php.net/manual/en/function.fopen.php>
>
>
>
> --
> Jason Perkins
> url -> <http://www.somebodydial911.com/>
--- End Message ---
--- Begin Message ---
Hello PHP.
I'm running Linux Mandrake 9.0 with Apache 1.3.26 and PHP 4.2.3 and I'm
trying to get the XML parser "expat" to work. I get this error:
Call to undefined function: xml_parser_create()
I have installed expat from the Mandrake Control center, but I dont
think PHP found that out :-)
I checked out the manual and found a tip:
libexpat.a: $(OBJS)
ar -rc $@ $(OBJS)
ranlib $@
but i do not know what to do with it ?
How do I get the XML parser to work with PHP ???
Kind Regards Lasse Tarp
--- End Message ---
--- Begin Message ---
Im' sorry but I discovered a problem when I try to send an HTML module to a
PHP file. Watch the example below:
module.html:
----------------------------------------------------------------------------
----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="welcome.php" method="GET">
<input type="text" name="user">
<br>
<input type="submit" value="premi qui">
</form>
</body>
</html>
welcome.php:
----------------------------------------------------------------------------
----
<html>
<head>
<title>Welcome</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
Print "Welcome <b>$user</b>";
?>
</body>
</html>
Under Microsoft XP's IIS with Php4 modules installled ther isn't any problem
but under Linux with Apache 2.0 and Php 4 modules installed, doesn't appear
nothing.
TO NOTE: Php's modules under this last system (linux/Apache2.0) run
correctly and other scripts have been execute correctly.
Thank you for any help
Tiziano Crimella - Switzerland
--- End Message ---
--- Begin Message ---
No idea what you mean html module, but it looks like a register_globals
problem.
Tiziano Crimella wrote:
Im' sorry but I discovered a problem when I try to send an HTML module to a
PHP file. Watch the example below:
module.html:
----------------------------------------------------------------------------
----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="welcome.php" method="GET">
<input type="text" name="user">
<br>
<input type="submit" value="premi qui">
</form>
</body>
</html>
welcome.php:
----------------------------------------------------------------------------
----
<html>
<head>
<title>Welcome</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
Print "Welcome <b>$user</b>";
?>
</body>
</html>
Under Microsoft XP's IIS with Php4 modules installled ther isn't any problem
but under Linux with Apache 2.0 and Php 4 modules installed, doesn't appear
nothing.
TO NOTE: Php's modules under this last system (linux/Apache2.0) run
correctly and other scripts have been execute correctly.
Thank you for any help
Tiziano Crimella - Switzerland
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
--- End Message ---
--- Begin Message ---
I mean that if you use the following code into welcome.php file:
<html>
<head>
<title>Welcome</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
Print "Welcome <b>$user</b>";
?>
</body>
</html>
You can pass directly this line: http://domain/welcome.php?user=nameofuser
into the address bar and the nameofuser specified as variable User, must be
visible in the following example:
"Welcome UserName"
bye
Tiziano Crimella
"Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> No idea what you mean html module, but it looks like a register_globals
> problem.
>
> Tiziano Crimella wrote:
>
> >Im' sorry but I discovered a problem when I try to send an HTML module to
a
> >PHP file. Watch the example below:
> >
> >module.html:
>
>---------------------------------------------------------------------------
-
> >----
> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> ><html>
> ><head>
> ><title>Module</title>
> ><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> ></head>
> >
> ><body>
> ><form action="welcome.php" method="GET">
> ><input type="text" name="user">
> ><br>
> ><input type="submit" value="premi qui">
> ></form>
> ></body>
> ></html>
> >
> >welcome.php:
>
>---------------------------------------------------------------------------
-
> >----
> ><html>
> ><head>
> ><title>Welcome</title>
> ><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> ></head>
> >
> ><body>
> ><?php
> >Print "Welcome <b>$user</b>";
> >?>
> ></body>
> ></html>
> >
> >Under Microsoft XP's IIS with Php4 modules installled ther isn't any
problem
> >but under Linux with Apache 2.0 and Php 4 modules installed, doesn't
appear
> >nothing.
> >
> >TO NOTE: Php's modules under this last system (linux/Apache2.0) run
> >correctly and other scripts have been execute correctly.
> >
> >Thank you for any help
> >
> >Tiziano Crimella - Switzerland
> >
> >
> >
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding. Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>
>
--- End Message ---
--- Begin Message ---
No idea what you mean html module, but it looks like a register_globals problem.
I completely agree. But for the sake of beating a dead horse.
The value you are looking for in this instance is located in the
appropriate global arrays($_GET,$_POST,$_SERVER, etc, etc)
So basically, you could do the following (in your welcome.php file).
$user = $_GET['user'];
HTH,
Jason k Larson
--- End Message ---
--- Begin Message ---
Hi all,
This is a fast question. Does anyone remembers how to obtain the ID auto
assigned after an INSERT statement under MySQL?
Thanks in advanced,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/function.mysql-insert-id.php
Cesar Aracena wrote:
Hi all,
This is a fast question. Does anyone remembers how to obtain the ID auto
assigned after an INSERT statement under MySQL?
Thanks in advanced,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--- End Message ---
--- Begin Message ---
At 06:41 AM 12/30/02 -0300, Cesar Aracena wrote:
Hi all,
This is a fast question. Does anyone remembers how to obtain the ID auto
assigned after an INSERT statement under MySQL?
http://www.php.net/manual/en/function.mysql-insert-id.php
Rick
--- End Message ---
--- Begin Message ---
Consider the following:
page1.php
<?php
// initializing soap server object, blah, blah, whatever here.
// the important function, dumbed down to the barest essentials.
//
function test() {
$retval = "";
$xml = "<root><row><element>test</element></row></root>\n";
$retval = serialize( domxml_open_mem( $xml ));
return $retval;
}
?>
page2.php
<?php
require_once( 'nusoap.php' );
// this is immaterial; don't dwell on it ;p I'm just dumbing it down.
$parameters = array();
$soapclient = new soapclient( 'http://somepage.php' );
$xml = $soapclient->call( 'test', $parameters );
$xml = unserialize( $xml );
$xml->dump_mem();
?>
In the test function, if I just serialize the $xml, return it and then call
xmldoc_open_mem on the unserialized return string, it works fine.
But it doesn't like it if I do the above. I'm getting the error:
Warning: dump_mem() [function.dump-mem]: Underlying object missing or of
invalid type
Warning: dump_mem() [function.dump-mem]: Cannot fetch DOM object
Why isn't the serialization of the DOM object not working that way?
thnx,
Chris
--- End Message ---
--- Begin Message ---
I'm switching from a MySQL environment to PGSQL and I'm
going through and trying to learn the differences between the
two. I've come across some issues that I can't seem to find the
answers to in the docs or on the web. I'm hoping someone can
help me out.
* MySQL has a function to reset the result set so that it can be
iterated through again - mysql_data_seek(). I don't see that there
is a similar function for PGSQL. Is that true? If so, in order to
reset the result set you have to perform the query again? Isn't
that a waste of resources?
* For PGSQL, you can get the database name, the field name
even the *host name* but you can't get the table name from a
particular query?
Any info would be greatly appreciated!
Chris
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 18:13, Boget, Chris wrote:
> I'm switching from a MySQL environment to PGSQL and I'm
> going through and trying to learn the differences between the
> two. I've come across some issues that I can't seem to find the
> answers to in the docs or on the web. I'm hoping someone can
> help me out.
>
> * MySQL has a function to reset the result set so that it can be
> iterated through again - mysql_data_seek(). I don't see that there
> is a similar function for PGSQL. Is that true? If so, in order to
> reset the result set you have to perform the query again? Isn't
> that a waste of resources?
pg_result_seek() should perform a similar function. In most cases you wouldn't
need to use that because if you're going to be using the results more than
once you could store them in an array.
> * For PGSQL, you can get the database name, the field name
> even the *host name* but you can't get the table name from a
> particular query?
Not sure what you're getting at here. Surely for any particular query, _you_
would know what table(s) is/are being used?
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
In Hollywood, all marriages are happy. It's trying to live together
afterwards that causes the problems.
-- Shelley Winters
*/
--- End Message ---
--- Begin Message ---
> pg_result_seek() should perform a similar function. In most cases
> you wouldn't need to use that because if you're going to be using
> the results more than once you could store them in an array.
Sometimes yes, sometimes no. But a valid point nonetheless.
> > * For PGSQL, you can get the database name, the field name
> > even the *host name* but you can't get the table name from a
> > particular query?
> Not sure what you're getting at here. Surely for any particular
> query, _you_ would know what table(s) is/are being used?
That's not necessarily true. Certainly not if you are using an
abstraction layer to access the database. Take PEAR for example.
When instantiation on object, you give it the relevant connection
information (user, pw, host and perhaps a dbname that may or may
not be the dbname that gets queried later on). So sure, you can
access those member variables (except maybe dbname; I don't think
that gets stored) which is also information you can get
programatically using built in functions. But let's say you pass
a query to the query() method that doesn't use the dbname that
you used when instantiating the object. That's certainly valid.
But now, there's no way (ok, there's a way but it isn't necessarily
accurate) to get the dbname for the query that was just run... apart from
requiring the programmer to pass the dbname as another paramter
to the query() method You can do this in mysql. I just don't know
why you can't do this in pgsql.
Chris
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 18:41, Boget, Chris wrote:
> > > * For PGSQL, you can get the database name, the field name
> > > even the *host name* but you can't get the table name from a
> > > particular query?
> >
> > Not sure what you're getting at here. Surely for any particular
> > query, _you_ would know what table(s) is/are being used?
>
> That's not necessarily true. Certainly not if you are using an
> abstraction layer to access the database. Take PEAR for example.
> When instantiation on object, you give it the relevant connection
> information (user, pw, host and perhaps a dbname that may or may
> not be the dbname that gets queried later on). So sure, you can
> access those member variables (except maybe dbname; I don't think
> that gets stored) which is also information you can get
> programatically using built in functions. But let's say you pass
> a query to the query() method that doesn't use the dbname that
> you used when instantiating the object. That's certainly valid.
> But now, there's no way (ok, there's a way but it isn't necessarily
> accurate) to get the dbname for the query that was just run... apart from
> requiring the programmer to pass the dbname as another paramter
> to the query() method You can do this in mysql. I just don't know
> why you can't do this in pgsql.
Sorry, you've lost me. In your OP you say you wanted the "table name", but now
you're talking about the "dbname"? For dbname, you can use (oddly enough)
pg_dbname().
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
[Babe] Ruth made a big mistake when he gave up pitching.
-- Tris Speaker, 1921
*/
--- End Message ---
--- Begin Message ---
At 06:20 PM 12/30/02 +0800, Jason Wong wrote:
On Monday 30 December 2002 18:13, Boget, Chris wrote:
> I'm switching from a MySQL environment to PGSQL and I'm
> going through and trying to learn the differences between the
> two.
The things that bothered me the most:
o Pg doesn't have DATE_FORMAT(), or the types SET and ENUM.
o Changing database structure is harder. With PG, I usually found it
easier to dump, edit, then reload the database to make changes I did
in MySQL with ALTER TABLE.
o The command line program's exit command starts with a \. It took me
a long time to find that...
The command line interface for pg is much better.
o Large result sets are returned in less, and the command editor feels better.
o There are lots of cool things you can look at with the \ commands in
the command line program. try \help
o You can see the source code of the queries that make up the \ commands.
I don't remember exactly how, but it is either in \help or the man page.
> * MySQL has a function to reset the result set so that it can be
> iterated through again - mysql_data_seek().
pg_fetch_array() has a third parameter that specifies which record to return.
In most cases you wouldn't
need to use that because if you're going to be using the results more than
once you could store them in an array.
I disagree... You have easy access to the entire result set, in any order,
with either database. You are wasting time and memory making another copy
of the data.
Rick
--- End Message ---
--- Begin Message ---
At 04:41 AM 12/30/02 -0600, Boget, Chris wrote:
You can do this in mysql. I just don't know
why you can't do this in pgsql.
The basic answer to why the interfaces to the databases differ is because
the PHP interfaces reflects the C interface provided by the database
authors. Most PHP extensions are just wrappers that allow you to call
existing libraries.
Rick
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 19:11, Rick Widmer wrote:
> At 06:20 PM 12/30/02 +0800, Jason Wong wrote:
> >On Monday 30 December 2002 18:13, Boget, Chris wrote:
> > > I'm switching from a MySQL environment to PGSQL and I'm
> > > going through and trying to learn the differences between the
> > > two.
>
> The things that bothered me the most:
>
> o Pg doesn't have DATE_FORMAT(),
pg's date functions are pretty abysmal compared to mysql's.
> or the types SET and ENUM.
These aren't standard and handling these in PHP does require a bit more code.
So you're probably better off using an extra table instead.
> o Changing database structure is harder. With PG, I usually found it
> easier to dump, edit, then reload the database to make changes I did
> in MySQL with ALTER TABLE.
pg's ALTER TABLE doesn't really let you alter much at all which makes
prototyping a pain.
> o The command line program's exit command starts with a \. It took me
> a long time to find that...
Use CTRL-d, it's a very commonly used "exit command" which gets you out of
almost anything -- mysql, psql, ftp, telnet, ssh etc.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Ambiguity:
Telling the truth when you don't mean to.
*/
--- End Message ---
--- Begin Message ---
> Sorry, you've lost me. In your OP you say you wanted the
> "table name", but now you're talking about the "dbname"?
> For dbname, you can use (oddly enough) pg_dbname().
Eeep, I'm ever so sorry. That's what I get for responding
at 4:30a when trying to battle insomnia.
Yes, I am looking for the table name, not dbname. My
apologies.
Chris
--- End Message ---
--- Begin Message ---
Due to writing this email *way* too early in the morning, I got
everything mixed up and didn't say what I meant. The below
is what I really meant.
> Not sure what you're getting at here. Surely for any particular
> query, _you_ would know what table(s) is/are being used?
That's not necessarily true. Certainly not if you are using an
abstraction layer to access the database. Take PEAR for
example. When instantiation on object, you give it the relevant
connection information. When you pass a query to the query()
there's no way (ok, there's a way but it isn't necessarily accurate)
to get the table name for the query that was just run... apart from
requiring the programmer to pass the table name as another
paramter to the query() method You can do this in mysql using
the mysql_tablename() function.
I just don't know why you can't do this in pgsql.
Chris
--- End Message ---
--- Begin Message ---
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote:
>The things that bothered me the most:
>
>o Pg doesn't have DATE_FORMAT()
to_char() accomplishes the same thing, for example:
select to_char(lastlogin, 'FMMM-DD-YYYY FMHH:MI AM') as lastloginf
from users;
>, or the types SET and ENUM.
I'm not sure what SET is, never used it, but ENUM is totally
unnecessary in Postgres because it supports foreign keys. If you want
a particular field to only allow ENUM('red', 'blue', 'green') then
create a lookup table, insert these values into it, and then set up a
foreign key. This is more standard anyway, and if you need to update
the set there is no need to touch the database schema.
>o Changing database structure is harder. With PG, I usually found it
> easier to dump, edit, then reload the database to make changes I did
> in MySQL with ALTER TABLE.
True, changing schema is a major PITA with Postgres. My only real
complaint about it, in fact...
--- End Message ---
--- Begin Message ---
> >o Pg doesn't have DATE_FORMAT()
> to_char() accomplishes the same thing, for example:
> select to_char(lastlogin, 'FMMM-DD-YYYY FMHH:MI AM') as lastloginf
> from users;
Unless I missed something, that function doesn't work with unix timestamps.
Is there anythin internal to PG that allows you to convert to and from unix
timestamps?
>, or the types SET and ENUM.
> >o Changing database structure is harder. With PG, I usually found it
> > easier to dump, edit, then reload the database to make changes I did
> > in MySQL with ALTER TABLE.
> True, changing schema is a major PITA with Postgres. My only real
> complaint about it, in fact...
That's how I did it and it was, indeed, a pain in the butt... But there was
some good that came out of it. When I created the MySQL tables, I didn't
have foreign keys (wasn't using InnoDB), constraints or anything like that
so in recreating the tables, I was able to implement those things to make
life easier down the road when reworking the code and the logic.
Chris
--- End Message ---
--- Begin Message ---
On Mon, 30 Dec 2002 07:57:04 -0600, you wrote:
>> >o Pg doesn't have DATE_FORMAT()
>> to_char() accomplishes the same thing, for example:
>> select to_char(lastlogin, 'FMMM-DD-YYYY FMHH:MI AM') as lastloginf
>> from users;
>
>Unless I missed something, that function doesn't work with unix timestamps.
>Is there anythin internal to PG that allows you to convert to and from unix
>timestamps?
To convert TO a unix timestamp:
select date_part('epoch', lastlogin) as lastloginf;
or
select extract(epoch from lastlogin) as lastloginf;
To convert FROM a unix timestamp:
select to_char(timestamp 'epoch' + unix_timestamp, 'FMMM-DD-YYYY
FMHH:MI AM');
>That's how I did it and it was, indeed, a pain in the butt... But there was
>some good that came out of it. When I created the MySQL tables, I didn't
>have foreign keys (wasn't using InnoDB), constraints or anything like that
>so in recreating the tables, I was able to implement those things to make
>life easier down the road when reworking the code and the logic.
And there is the major benefit of using Postgres...not to mention
sub-selects, views, unions, etc. Once you get used to these things
it's very hard to give them up.
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 21:33, Chris Boget wrote:
> Due to writing this email *way* too early in the morning, I got
> everything mixed up and didn't say what I meant. The below
> is what I really meant.
>
> > Not sure what you're getting at here. Surely for any particular
> > query, _you_ would know what table(s) is/are being used?
>
> That's not necessarily true. Certainly not if you are using an
> abstraction layer to access the database. Take PEAR for
> example. When instantiation on object, you give it the relevant
> connection information. When you pass a query to the query()
> there's no way (ok, there's a way but it isn't necessarily accurate)
> to get the table name for the query that was just run... apart from
> requiring the programmer to pass the table name as another
> paramter to the query() method You can do this in mysql using
> the mysql_tablename() function.
> I just don't know why you can't do this in pgsql.
Either you're confused or I'm confused :)
mysql_tablename() is used in conjunction with mysql_list_tables() to get the
names of the tables defined in the specified database. It cannot "get the
table name for the query that was just run...". And another thing, you _know_
the query "that was just run", and presumably the tables used is part of the
query itself, so why would you need another function to tell you should
already know? Can you give an example of what you're trying to do?
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Q: How did you get into artificial intelligence?
A: Seemed logical -- I didn't have any real intelligence.
*/
--- End Message ---
--- Begin Message ---
> To convert TO a unix timestamp:
> To convert FROM a unix timestamp:
Excellent. Thank you very much for the info!
> And there is the major benefit of using Postgres...
Why do you think I decided to move to Postgres? :P
> not to mention sub-selects, views, unions, etc.
Indeed. And I'm going to take every advantage in using
them in my code. I figure when all is said and done, the
scripts will run so much faster because it won't have to
be doing those things programatically.
Chris
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 21:57, Chris Boget wrote:
> > >o Pg doesn't have DATE_FORMAT()
> >
> > to_char() accomplishes the same thing, for example:
> > select to_char(lastlogin, 'FMMM-DD-YYYY FMHH:MI AM') as lastloginf
> > from users;
>
> Unless I missed something, that function doesn't work with unix timestamps.
No, it only works on pg's date/time formats.
> Is there anythin internal to PG that allows you to convert to and from unix
> timestamps?
Best to store date/time in pg's format rather than unix timestamp.
If you've got legacy data which are stored as unix timestamps then you can do
one of the following:
1) Do a one time conversion from unix timestamp to pg date/time
2) Manipulate the dates in PHP instead
3) Write your own function in pg to convert them on the fly
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Griffin's Thought:
When you starve with a tiger, the tiger starves last.
*/
--- End Message ---
--- Begin Message ---
> Either you're confused or I'm confused :)
It's me. This just hasn't been a good week for me. :p
One time I'll get it right!
> mysql_tablename() is used in conjunction with mysql_list_tables() to get the
> names of the tables defined in the specified database. It cannot "get the
> table name for the query that was just run...".
You are right. The function I was thinking of was
mysql_field_table()
I knew I should have consulted the documentation and not
relied on my memory. :p
> And another thing, you _know_ the query "that was just run", and presumably
> the tables used is part of the query itself,
That's not true in all cases.
> so why would you need another function to tell you should already know? Can you
> give an example of what you're trying to do?
Sure. And this is what prompted my message initially. PEAR's sql2xml only works
with mysql because there's no way to get the table name programatically. When you
are using an abstraction such as this, unless you pass another argument to the primary
function, you have to go through hoops within the abstraction just to pull it out of
the
query.
The code for sql2xml can be found here:
http://pear.php.net/package-info.php?pacid=18
Chris
--- End Message ---
--- Begin Message ---
Hi all,
Sorry to bother you all, but I need something I haven't used in quite a
long time. Dows anyone remembers the PHP function to fill a number with
zeros until it reaches a desired length?
Thanks in advance,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--- End Message ---
--- Begin Message ---
How about:
http://www.php.net/manual/en/function.str-pad.php
HTH,
Jason k Larson
Cesar Aracena wrote:
Hi all,
Sorry to bother you all, but I need something I haven't used in quite a
long time. Dows anyone remembers the PHP function to fill a number with
zeros until it reaches a desired length?
Thanks in advance,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/function.str-pad.php
or
use sprintf, e.g.
$formatted = sprintf("%012.2f", $value);
pads $value up to 12 digits to the left with zero's.
-----Original Message-----
From: Cesar Aracena [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Zerofill
Hi all,
Sorry to bother you all, but I need something I haven't used in quite a
long time. Dows anyone remembers the PHP function to fill a number with
zeros until it reaches a desired length?
Thanks in advance,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
A quite anusual problem - and I can't figure it out..
My script, using the usort-function works properly
on my local php-environment (PHP 4.0.6) but not
on my server, running php 4.1.2!
I've read in a documentation, that php since 4.1.0
doesn't accept zero as return-value of the compare-function.
But that value never occurs in my script!
There are no error messages,
the server just stops interpreting my script
after 7 calls of the compare function -
no farther commands are recognized!
The max. execution-time isn't exceeded;
i've tested that.
If I replace usort, and use a bubblesort function instead,
everythings works fine.. I use:
> for ($a = 0; $a < count($zeile); $a++)
>
> for ($b = $a; $b < count($zeile); $b++)
>
> $c = sortieren($zeile[$a], $zeile[$b]);
> if ($c < 0){ $temp = $zeile[$a]; $zeile[$a] = $zeile[$b]; $zeile[$b] =
$temp; }
> } }
It's a strange problem, isn't it?
Thanks in advance.
--- End Message ---
--- Begin Message ---
Hi all,
First of all, apologies if this is a question that has already been
asked and answered, but a quick search of the archives didn't turn up
anything - perhaps because it's hard to think of good keywords...
I'm experiencing a bizarre problem with PHP 4.2.2 and Apache 2.0.40 -
both the versions that shipped with Red Hat 8.0. I don't know what's
causing it and it may not actually be PHP's 'fault' at all, but I'm
hoping that some kind soul here will be able to help me out!
I have several PHP web applications which have large text boxes (Wiki
sites etc.). Usually, they work fine, but sometimes, if a large-ish
amount of text is entered, the server seems to receive a mangled mess
which includes the full text but with a second copy of part of it
inserted somewhere at the end. You can edit the page again, remove the
extra content and save, but it'll just get added back... I originally
suspected this must be a problem with the PHP scripts themselves, but
now find that it happens with several different independent things so
can't be that simple. Furthermore, it worked happily on my previous
setup with Apache 1.3 and a slightly older PHP.
Also, image and other file uploads seem to be deeply broken: it'll
accept and store an image, but on then trying to view it I find that the
file size is much bigger and most of the picture has just become plain
grey... this may or may not be related/the same problem, but I would
imagine that if the same thing happened to binaries as does to text it
might have an effect like this...
Anyone seen this before? Any suggestions/things to try? It's driving
me mad...
Thanks very much,
Simon
--- End Message ---
--- Begin Message ---
> Anyone seen this before? Any suggestions/things to try? It's driving
> me mad...
I would strongly suggest using Apache 1.3.x instead of Apache 2.
Apache2+PHP simply is nowhere near stable.
-Rasmus
--- End Message ---
--- Begin Message ---
Hello !
I have problem with php-4.3.0 i can not install it on my 3 different rh7.0 servers.
./configure --prefix=/usr --with-config-file-path=/etc --disable-debug
--enable-pic --enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs
--with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd
--with-jpeg-dir=/usr --with-png --with-zlib --with-zlib-dir=/usr/local/lib
--with-gdbm --enable-debugger --enable-magic-quotes --enable-safe-mode
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars
--enable-yp --enable-ftp --enable-wddx --with-mysql
--without-oracle --without-oci8 --with-xml
Errors:
multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
-ldl -lnsl -lcrypt -o sapi/cli/php
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
/root/http_stuff/php/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam' is dangerous, better use `mkstemp'
functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
-ldl -lnsl -lcrypt -o sapi/cli/php
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
/root/http_stuff/php/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam' is dangerous, better use `mkstemp'
functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
-ldl -lnsl -lcrypt -o sapi/cli/php
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
/root/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is
dangerous, better use `mkstemp'
--
Best regards,
gnu_is_not_unix
-----------------------------------------------------------------------
Konto bez opłat i prowizji?
TAK! eKONTO w mBanku! < http://pf.wp.pl/mbank.html >
--- End Message ---
--- Begin Message ---
I don't see any errors there, just a couple of rather harmless warnings.
On Mon, 30 Dec 2002, [EMAIL PROTECTED] wrote:
> Hello !
>
> I have problem with php-4.3.0 i can not install it on my 3 different rh7.0 servers.
>
> ./configure --prefix=/usr --with-config-file-path=/etc --disable-debug
> --enable-pic --enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs
> --with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd
> --with-jpeg-dir=/usr --with-png --with-zlib --with-zlib-dir=/usr/local/lib
> --with-gdbm --enable-debugger --enable-magic-quotes --enable-safe-mode
> --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars
> --enable-yp --enable-ftp --enable-wddx --with-mysql
> --without-oracle --without-oci8 --with-xml
>
> Errors:
>
> multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
>main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
>-ldl -lnsl -lcrypt -o sapi/cli/php
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
> /root/http_stuff/php/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
>`tempnam' is dangerous, better use `mkstemp'
>
> functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
>Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
>main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
>-ldl -lnsl -lcrypt -o sapi/cli/php
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
> /root/http_stuff/php/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
>`tempnam' is dangerous, better use `mkstemp'
>
> functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
>Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
>main/internal_functions_cli.lo -lnsl -lpng -lz -ljpeg -lgdbm -lz -lcrypt -lresolv -lm
>-ldl -lnsl -lcrypt -o sapi/cli/php
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
> /root/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is
>dangerous, better use `mkstemp'
>
> --
> Best regards,
> gnu_is_not_unix
>
> -----------------------------------------------------------------------
> Konto bez op³at i prowizji?
> TAK! eKONTO w mBanku! < http://pf.wp.pl/mbank.html >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
hi all,
i jus can't get php to work.i've installed apache web
server in windows 2000 platform and tried to run a php
script which is in
d:/work/sample.php.but the browser prints out a
http:404 error saying that the page cannot be
displayed.
in the httpd.conf file,
i 've given the scriptAlias
as ScriptAlias d:/work/ to be treated as /first/
so, when i jus type in http:/localhost/ i get the
screen one usually gets when the apache is sucessfully
installed.and when i type in http://localhost/first/,
those files under the d:/work/ directory get
succesfully listed.but the problem starts when i click
on those scripts.
please help
Thank you.
Celia
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
I'm trying to redo a db lookup into a function. The function is placed in a
class called tracking and declared thus:
function setCurrentDevGroup($devID)
{
// start original routine
$query = "SELECT dev_group FROM tracking WHERE (computer =
$devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
return($lookuptable);
}
//end original routine
}
This is called from the code as:
$tracking->setCurrentDevGroup($this->ComputerID); // $this->ComputerID is
// known as eg 5.
In the page which relies on the value of setCurrentDevGroup I get:
Call to a member function on a non-object in
/www/htdocs/dev/include/irm.inc on line 2857
Line 2857 is the one starting "$tracking->" above. Obviously I'm doing
something wrong here. What?
Cheers,
Martin S.
--- End Message ---
--- Begin Message ---
On Mon, 30 Dec 2002 14:48:13 +0100, you wrote:
>function setCurrentDevGroup($devID)
> {
>// start original routine
> $query = "SELECT dev_group FROM tracking WHERE (computer =
>
>
>
>
>
>
>
>
>
>
>
>
> $devID)";
> $sth = $adb->prepare($query);
[...]
> Call to a member function on a non-object in
>/www/htdocs/dev/include/irm.inc on line 2857
Just a guess, but where did $adb inside your function come from? It
doesn't appear that you've instantiated it.
--- End Message ---
--- Begin Message ---
On Monday 30 December 2002 22:07, Michael Sims wrote:
> On Mon, 30 Dec 2002 14:48:13 +0100, you wrote:
> >function setCurrentDevGroup($devID)
> > {
> >// start original routine
> > $query = "SELECT dev_group FROM tracking WHERE (computer =
> > $devID)"; $sth =
> > $adb->prepare($query);
>
> [...]
>
> > Call to a member function on a non-object in
> >/www/htdocs/dev/include/irm.inc on line 2857
>
> Just a guess, but where did $adb inside your function come from? It
> doesn't appear that you've instantiated it.
Specifically, if it's instantiated elsewhere in your code and it's in the
global scope then you need to declare it as global within your function:
function setCurrentDevGroup($devID) {
global $adb;
/// rest of function
}
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Maybe we could paint GOLDIE HAWN a rich PRUSSIAN BLUE --
*/
--- End Message ---
--- Begin Message ---
Hello,
I have a multi-lingual site and was wondering if anyone knew of a PHP function to
detetct a browser's preferred laguages.
I know I can parse it in the _SEREVR var [HTTP_ACCEPT_LANGUAGE] => fr, fr-ca;q=0.75,
en-us;q=0.50, en;q=0.25
But I was just wondering if somewhere PHP already had a function. Something like:
var array get_lang();
where array would be:
"fr"=>0.75
"fr-ca"=>0.75
"en-us"=>0.50
"en"=>0.25
Also I'm guessing that q=? is a score of some sort. With highest score being the
preferred one?
Mike
--- End Message ---
--- Begin Message ---
I am creating a 'vacation' scheduling webpage for my company. Currently,
when we want a day off, we fill out a document in word and send it to our
supervisor. The page I am working on will have a calendar that displays who
is off when. I would like for the employees to click on a date, enter their
information and then when the info is saved to the db, I would like to have
the .doc automatically created with the info and sent to their supervisor.
Is this possible??
Thanks,
Eddie
--- End Message ---
--- Begin Message ---
My guess is that your best bet is creating either an HTML or RTF
documents, both of which are readable by MS Word. RTF is well documented
and it should be fairly easy to work with--you can save a template with
placeholders and simply replace them, since it's entirely text-based.
Cheers,
Marco
--
----------------
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!
--- Begin Message ---
I am creating a 'vacation' scheduling webpage for my company. Currently,
when we want a day off, we fill out a document in word and send it to our
supervisor. The page I am working on will have a calendar that displays who
is off when. I would like for the employees to click on a date, enter their
information and then when the info is saved to the db, I would like to have
the .doc automatically created with the info and sent to their supervisor.
Is this possible??
Thanks,
Eddie
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- End Message ---
--- Begin Message ---
Thanks Marco,
So I would just create the .rtf file with php, then store it on the server
and attach it to the e-mail?
Thanks,
Eddie
-----Original Message-----
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 9:17 AM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] creating a .doc file in php
My guess is that your best bet is creating either an HTML or RTF
documents, both of which are readable by MS Word. RTF is well documented
and it should be fairly easy to work with--you can save a template with
placeholders and simply replace them, since it's entirely text-based.
Cheers,
Marco
--
----------------
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!
--- End Message ---
--- Begin Message ---
I have a similar question/problem. However, I want to use an external
"email template" as it were, so that the sales guys can edit it as they
like and simply shuffle the three variables around that they need
$username, $password, $code (either with or without the <?php ?> tags).
I don't want them mucking around in my code and potentially screwing it
up. Not to mention having a huge 'email' text in between those
HTMLMESSAGE markers is ugly as hell and ends up making the color-coding
in HomeSite all kinds of whack at the end of it.
I tried to use:
$message = <<<HTMLMESSAGE
include("/pathto/customer_email.php");
HTMLMESSAGE;
But $message has the literal string instead of including the file. Grr..
(wouldn't it make sence that an include() should be parsed FIRST with
the contents put in place basically? This seems like a 'bug' not a
feature.
I also tried:
$filename = "/pathto/customer_email.php";
$fd = fopen ($filename, "r");
$message = fread ($fd, filesize ($filename));
fclose ($fd);
But all the $username, etc. are treated as literals and if I use
<?=$username?> in the customer_email.php the field is blank (like it's
being parsed but doesn't have a value for it or something), instead of
being converted to their actual PHP values. I also tried to put the
"global" keyword in the customer_email.php file at the top.
Is there no way to accomplish this?
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
>
>
> Use a here-doc:
>
> echo <<<EOB
> <br>[$data] <br> $titulo <br>($user)<br> $intro <br> $texto
> <br><br> (comentarios=$contador)<br><br><hr size=1 width=90%><br>
> EOB;
--- End Message ---
--- Begin Message ---
Hi,
I am sending information from Flash to PHP and ideally I just want to send
an array. Would php treat the info as an array or a string? If it is the
latter, is there a way that I can convert the information into an array? In
Flash you can use the .split action but I'm not too sure of the PHP 4
equivalent.
Thanks
--- End Message ---