[PHP] problem about ereg function

2001-09-30 Thread mydata

hi,
I am using ereg funtion to deal with data submmited by form
detail shown below:

I am using a form to submit some html code include image path code
In submitted php page, I want to replace image path code in html code
(submitted by last page' form), unfortunately the image path code include
some php variable (eg "imag src ='$phpvaribe'"),I want to use ereg function
to replace image path code by the value I need. but when I use eregi_replace
fuction try to replace it . but browser show me parsing error . I don't know
how to use eregi_replace() when php varible in string which needed to be
replaced. Could someone help me. My error code show below:

MY ERROR CODE:

eregi_replace("^\"(.)*{$img1_name}\"$","$replacestring",$content)


remark:the $img1_name is the php variable in the string which needed to be
replaced



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Does PHP + PHP CACHE can vs JSP ?

2001-09-26 Thread mydata

I just want to know which is best solution , if my web site is heavy loaded.


mydata



"Jason G." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> A good question is:  Do you REALLY need the speed difference, or should
you
> be asking which is the best language to do Dynamic Web Development
> in???  Which is better supported, which is most cost effective, which is
> Open Source, which is Better...
>
> -Jason Garber
> deltacron.com
>
> At 02:48 PM 9/27/2001 +0800, mydata wrote:
> >Hi,
> >I heard about JSP a lot recently though I doing PHP programing now.
> >somebody said jsp is most fastest in (asp , php , jsp).
> >I want to know if it is true . And if I use PHP + php cache , can I speed
up
> >PHP as same as JSP as they said.
> >
> >I just want to know which is the best solution ,(php + php cache) or jsp
.
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: session.auto_start = 1

2001-09-26 Thread mydata

Did you restart your web sever? If you using IIS ,you must use comand line
to restart server.

"Yaroukh" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there
>
> I have set "session.auto_start" to "1", but without "Session_Start()" the
> session handling doesn't work. But I think it definetely should - am I
> wrong? /:o) Or what else should I change in PHP.INI to make this work
> properly.
>
> Bye
> Yaroukh
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Does PHP + PHP CACHE can vs JSP ?

2001-09-26 Thread mydata

Hi,
I heard about JSP a lot recently though I doing PHP programing now.
somebody said jsp is most fastest in (asp , php , jsp).
I want to know if it is true . And if I use PHP + php cache , can I speed up
PHP as same as JSP as they said.

I just want to know which is the best solution ,(php + php cache) or jsp .



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how to make the php page always newest when clicking 'back' botton in browser?

2001-09-25 Thread mydata

thanks a lot
"Brad Hubbard" <[EMAIL PROTECTED]> wrote in message
01092520521106.01344@badnote">news:01092520521106.01344@badnote...
> On Tue, 25 Sep 2001 13:09, mydata wrote:
> > Hi,I meet a problem when I am developing.
> >
> > I am developing php base on other programer's php code .
> > I must make the php page always newest when clicking 'back' botton in
> > browser(because that programer using javascript: history.go(-1)), I try
> > sent header() to disable cach,but seems to not works:
> > my development show below:
> > I have two page: page1 and page2 , on page1 I have a form which used to
> > send parameter to page2, when I submit this form ,the URL change to
page2
> > ,page2 use php code to deal with parameter and date submitted by form on
> > page1 , then page use javascript: history.go(-1) to return page1 . and
> > page1 must show newest information .
> >
> > I think it maybe not php questtion ,maybe I shoud insert some javascript
> > code into page1 somewhere,but I don't know what to . Could somebody help
me
> > , thank you very much.
>
>
>
> You're welcome.
>
> // Function to disable caching of individual page
> function Congo_nocache()
> {
> $dateHeader=time();
> $expHeader=$dateHeader-60; // set expire date for 60 seconds ago
> $modHeader=$dateHeader-3600; // set modified date for an hour ago
> header("Date: " . gmdate("D, d M Y H:i:s",$dateHeader)." GMT");
> // Current
> Date
> header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
> header("Expires: " . gmdate("D, d M Y H:i:s",$expHeader)." GMT");
> // Date in
> the past
> header("Last-Modified: " . gmdate("D, d M Y H:i:s",$modHeader)."
> GMT"); //
> always modified
> header("Pragma: no-cache"); // HTTP/1.0
> }
>
> Sorry about the formatting (or lack of it :-)
>
> Happy trails,
> --
> Brad Hubbard
> Congo Systems
> 12 Northgate Drive,
> Thomastown, Victoria, Australia 3074
> Email: [EMAIL PROTECTED]
> Ph: +61-3-94645981
> Fax: +61-3-94645982
> Mob: +61-419107559



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: help with Mysql Query...

2001-09-24 Thread mydata

Don't use subselect in MySQL, MYSQL have not completed it now , Use "join"
to instead it.

"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm having trouble puting up a query in Mysql because of his lack of SQL
> syntax.
>
> I have a table A and a table B... I want all occurences from A there are
> not in B...
>
> in ANSI SQL... it's nothing more than:
>
> select a.id, a.name from table_a a, table_b b where a.id NOT IN (select id
> from table_b)
>
> and that's it... but in Mysql, since there are no sub-selects, I'm burning
> my brains out and not getting it... I don't wanna create a temp table like
> the manual suggests... this is way NOT efficient... I'd rather do it in
PHP
> code than having a query that creates a temporary table, then drop it...
>
>
> _
> . Christian Dechery
> . . Gaita-L Owner / Web Developer
> . . http://www.webstyle.com.br
> . . http://www.tanamesa.com.br
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to make the php page always newest when clicking 'back' botton in browser?

2001-09-24 Thread mydata

Hi,I meet a problem when I am developing.

I am developing php base on other programer's php code .
I must make the php page always newest when clicking 'back' botton in
browser(because that programer using javascript: history.go(-1)), I try sent
header() to disable cach,but seems to not works:
my development show below:
I have two page: page1 and page2 , on page1 I have a form which used to send
parameter to page2, when I submit this form ,the URL change to page2 ,page2
use php code to deal with parameter and date submitted by form on page1 ,
then page use javascript: history.go(-1) to return page1 . and page1 must
show newest information .

I think it maybe not php questtion ,maybe I shoud insert some javascript
code into page1 somewhere,but I don't know what to . Could somebody help me
, thank you very much.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how to use the function "strtotime"

2001-09-20 Thread mydata

thank a lot , I  learn a lot from reply from you !

"* R&Ze:" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
> From: mydata <[EMAIL PROTECTED]>
> Date: Thu, Sep 20, 2001 at 11:41:09AM +0800
> Message-ID: <[EMAIL PROTECTED]>
> Subject: [PHP] how to use the function "strtotime"
>
> > Hi,
> > I'm php developer beginner in China,but I am confused with function
> > "strtotime".
> > yes ,I know the usage of function "strtotime" in php manual. But
description
> > of php manual about it is too little.I want to know more about it.
>
> 
>
> 
>
> It's not all that difficult, really. It's exactly how it's described
> in the manual. Here is some code that runs some samples:
>
> (I must say, though, that most examples can be done a lot easier
> without strtotime(), but 'cause these are examples of strtotime()...
> well... you know :)
>
> --- PHP Example Code ---
> 
> 
> /* Show a given date (+time) */
> print ("Date: \n\t");
> print (date ("r", strtotime ("January 31 2000 19:20:15"))."\n\n");
>
> /* Show the current date (+time) */
> print ("Now: \n\t");
> print (date ("r", strtotime ("now"))."\n\n");
>
> /* Show the date (+time) of tomorrow */
> print ("Tomorrow: \n\t");
> print (date ("r", strtotime ("tomorrow"))."\n\n");
>
> /* Show the date (+time) of yesterday */
> print ("Yesterday: \n\t");
> print (date ("r", strtotime ("yesterday"))."\n\n");
>
> /* Show the date (+time) of yesterday, where now is tomorrow. So the
>the output will be today :) */
> print ("Yesterday, where 'now' is tomorrow: \n\t");
> print (date ("r", strtotime ("yesterday", strtotime("tomorrow")))."\n\n");
>
> /* Show the date (+time) 13 days from december 24th 1998 */
> print ("13 days from december 24th 1998: \n\t");
> print (date ("r", strtotime ("+13 days", strtotime("December 24
1998")))."\n\n"»
>
> /* Let's say you get some date from the db (or something) and you
>  * want to
>add 2 years and 4 months and 23 days. */
> print ("Well... just see: \n\t");
> $date_from_db = "2001-09-20";
> print (date ("r", strtotime ("+2 years +4 months +23 days",
> mktime(0,0,0,substr($date_from_db, 5, 2),
>  substr($date_from_db, 8, 2),
>  substr($date_from_db, 0,
4."\n\n");
>
> /* Etc. */
> print ("And so on... :)");
>
> ?>
> 
> --- End of PHP Example Code ---
>
> 
>
> --
>
> * R&zE:
>
>
> -- 
> -- Renze Munnik
> -- DataLink BV
> --
> -- E: [EMAIL PROTECTED]
> -- W: +31 23 5326162
> -- F: +31 23 5322144
> -- M: +31 6 21811143
> --
> -- Stationsplein 82
> -- 2011 LM  HAARLEM
> -- Netherlands
> --
> -- http://www.datalink.nl
> -- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: excuting several sql statements in one time

2001-09-20 Thread mydata

yes, it will not work,because mysql does not support it(the way you try to
use is 'procedure' called in MS SQL sever) , mysq developer said they will
accomplish in the further . you and I have to wait for it.


"VM ÁÖ¿N" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
>
> I want to know how to implement these several sql statements in one time.
>
> For example, I have 2 sql statements like :
>
> INSERT INTO com VALUES ('pentium');
> INSERT INTO com VALUES ('amd');
>
> Then, I want to excute these 2 sql statements in one time with PHP.
>
> I tried to implement like this :
>
> $query = "
> INSERT INTO com VALUES ('pentium');
> INSERT INTO com VALUES ('amd');
> ";
> mysql_query($query, $dbconnect);
>
> But as you know, it didn't work.
>
> Does any one know how to run this job?
>
> _
> MSN Explorer°¡ ÀÖÀ¸¸é Hotmail »ç¿ëÀÌ ÈξÀ Æí¸®ÇØ Áý´Ï´Ù. Áö±Ý
> http://explorer.msn.co.kr/ ¿¡¼­ ¹«·á·Î ´Ù¿î·ÎµåÇϼ¼¿ä.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how to use MYSQL date type string in php?

2001-09-19 Thread mydata

thank you very much

Could you offer me some available link about dealing datetime string in php?

"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > hi, I 'm new developer in php
> > I always need to get the date or time from mysql ,and dead it in php,but
I
> > found it defficult to deal mysql date type string in php. mysql date
type
> > string always like "-mm-dd",in php4.06 I can use strtotime fuction
> > convert it to unixtimestamp,but in php4.0 ,strtotime des not work.I
don't
> > know why?
> > And I want to know about how to deal date type string (speciall like
> > "-mm-dd") in php , and how to add days in date type string and so
> > on.Could you introduce me some good code sample or good link about deal
> > datetime in php.
>
> MySQL can do this work for you.
>
> ie.  select UNIX_TIMESTAMP(column_name) from table ...
>
> There are also ways to add intervals and many other things directly in
> MySQL.  However once you have it converted to a unix timestamp doing
> date-math in PHP is trivial in that you just add the appropriate number of
> seconds to the timestamp.
>
> Lots of info in the MySQL docs on this.
>
> -Rasmus
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to use MYSQL date type string in php?

2001-09-19 Thread mydata

hi, I 'm new developer in php
I always need to get the date or time from mysql ,and dead it in php,but I
found it defficult to deal mysql date type string in php. mysql date type
string always like "-mm-dd",in php4.06 I can use strtotime fuction
convert it to unixtimestamp,but in php4.0 ,strtotime des not work.I don't
know why?
And I want to know about how to deal date type string (speciall like
"-mm-dd") in php , and how to add days in date type string and so
on.Could you introduce me some good code sample or good link about deal
datetime in php.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to use the function "strtotime"

2001-09-19 Thread mydata

Hi,
I'm php developer beginner in China,but I am confused with function
"strtotime".
yes ,I know the usage of function "strtotime" in php manual. But description
of php manual about it is too little.I want to know more about it.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]