[PHP] Re: php array in different OS

2010-07-23 Thread Yang Fei
Dear Colin Guthrie ,

 Thanks for your help very much.
 According to your suggestion, I have solved the question.

best wish,
Yang Fei
2010-7-24


[PHP] php array in different OS

2010-07-20 Thread Yang Fei
Dear all,
I have a simple test code in different OS ,but it give me a different 
result.
the code as follows:
   ?php
$n= 5;
for($i=0;$i$n;$i++)
{
 $data[]=array(,$i,$i/1000);
 echo $i,  ,$data[$i][1],br;
}
echo count:,count($data);
   ?
   OS1:  Red Hat Enterprise Linux Server release 5.1 
 Linux 2.6.18-53.el5xen i686 i686 i386 GNU/Linux
   test result:  the result is correct,it can display 5 data and 
count:5.

   OS2: CentOS release 5.4 
Linux 2.6.18-164.el5 x86_64 x86_64 x86_64 GNU/Linux
   test result: the result is wrong,it can only display 31148 data and it can 
not display count value.
   I'm not sure the result relate to array capacity in different OS.
   Please give me some tips,thanks in advance. 

good luck,

Yang Fei
2010-7-20


[PHP] how to use php from mysql to xml

2008-01-05 Thread Yang Yang
hi,everyone,i am a newbuy for php world

and i have a problem when i study php


i want to make a script,it works for:
a mysql table,like

title authorcontentdate
a1a2   a3 a4
b1b2   b3b4
..


and i want to use php ,select it and make a xml to save it ,now i use this
script

?php

header(Content-type: text/xml);

$host = localhost;
$user = root;
$pass = ;
$database = test;

$linkID = mysql_connect($host, $user, $pass) or die(Could not connect to
host.);
mysql_select_db($database, $linkID) or die(Could not find database.);

$query = SELECT * FROM blog ORDER BY date DESC;
$resultID = mysql_query($query, $linkID) or die(Data not found.);

$xml_output = ?xml version=\1.0\?\n;
$xml_output .= entries\n;

for($x = 0 ; $x  mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= \tentry\n;
$xml_output .= \t\tdate . $row['date'] . /date\n;
// Escaping illegal characters
$row['text'] = str_replace(, , $row['text']);
$row['text'] = str_replace(, , $row['text']);
$row['text'] = str_replace(, gt;, $row['text']);
$row['text'] = str_replace(\, quot;, $row['text']);
$xml_output .= \t\ttext . $row['text'] . /text\n;
$xml_output .= \t/entry\n;
}

$xml_output .= /entries;

echo $xml_output;

 ?

it has no problem,but i want to save a xml file ,like this format

?xml version=1.0 encoding=GB2312?
Table
Record
Titlea1/Title
Authora2/Author
Contenta3/Content
date2003-06-29/date
/Record
Record
Titleb1/Title
Authorb2/Author
Contentb3/Content
date2003-06-30/date
/Record

many record
/Table



how can i improve this script?

Thanks all


[PHP] Re: TabPage like in Java or Windows

2007-03-04 Thread Edward Z. Yang
Alain Roger wrote:
 I attached a screenshot to this post in order to illustrate what i'm
 looking for.

Your image was scrubbed. Can you post a link to it?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Please Help!

2006-01-25 Thread S Yang

Dear Sir/Madam:

I am trying to split a DSA signature that is generated by openssl_sign() 
function in PHP, which should be made up of 2 numbers: r and s, but I don't 
know how to build the structure of the signature generated by PHP and then 
to split it into two numbers (r,s). Which method might I use to split the 
signature I have built in PHP into (r,s)? How can I know what the signature 
looks like? I appreciate your any helps in advance. I am looking forward to 
hearing from you.



Sincerely
Stephaney Yang
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] a problem about calling nusoap with the same key

2005-08-03 Thread Shiqi Yang
Hi all:

 

Now I am playing nusoap to call some apis. In the api doc, the example gives
like this:

ArrayList

 input name=a value=a

input name=b value=b

input name=c value=c

/ArrayList

 

My code like:

Array('ArrayList' = array(

'input' = array('name' = 'a', 'value'= 'b'))

);

But the key in the array should be different, so how can I construct it?

I also try :

Array('ArrayList' = 'input name=a value=a /input name=b' value=b
/);

But after the serializing $param, there is nothing in the ArrayList.

 

Does anyone know about it?

Any reply would be appreciated.

Thanks.

 

 

 

Best regards,

Shiqi Yang

 



[PHP] Question

2004-12-16 Thread Dennis Yang
Hi,
I'm using PHP 4.3.2 and using ODBC to connect to my Access database. I want to 
get the value from this query statement:
select count(id) as quantity from danhmucdia. How can I get this value? How 
can I equalize this value into variable ?
Thank you for reading my email.
Dennis

[PHP] help ???

2004-07-02 Thread Dannis Yang
Dear:
I wonder why my website runs smooth in PHP 4.1.1 but it does not in 4.3.7. 
 Dannis

RE: [PHP] when is OOP a good choice?

2003-02-12 Thread Le Yang
Object oriented programming in php has better logic thus is more
suitable for more complex jobs. It also makes maintenance easier,
although you have to write a bit more code

-Original Message-
From: anders thoresson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 12, 2003 3:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] when is OOP a good choice?

I've just started to read about - and will soon try to write - object 
oriented code. I think I've got the basics both from the PHP-books I
have, 
and from various sources on the web.

But nowhere have I read a good explanation to two of my questions:

 1. What are the main benefits from OOP?
 2. When is OOP a good choice for a PHP script, and when is ordinary 
functions a better call?

-- 
anders thoresson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] looking for php mailing-list in chinese language

2003-02-07 Thread yang
I'm sorry for my english

if you know mailing-list about php in Chinese language, please let me know!

thanks!

Yang Zhaori


Re: [PHP] GD Lib

2002-07-09 Thread Yang

Hi Dave:

I have gd installed and now the configure, make and make install are working
fine. but aftere installation, I can't find any extension there.

Yang

Dave Macrae [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi there;
 
  I installed Apache2.0.39 and PHP4.2.1 on RedHat Linux 7.2. The
  installation
  procedure is fine. The php installation inlcude gd and some
  extension, but I
  can't find the php-gd.so on my computer.
 
  Anybody can help?

 Looks like the problem is that you haven't installed GD.

 Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] GD Lib

2002-07-08 Thread Yang

Hi there;

I installed Apache2.0.39 and PHP4.2.1 on RedHat Linux 7.2. The installation
procedure is fine. The php installation inlcude gd and some extension, but I
can't find the php-gd.so on my computer.

Anybody can help?

Yang




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] how many day between the two time format

2001-09-30 Thread yang

i want to check about how many day between the two time format
like
$last_day=time format;
$today=time();
$between_day=?($today-$last_day);
echo $between_day is the between day...





-- 
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] Call to undefined function: dbase_open() in

2001-09-01 Thread yang

i want try to open the test.dbf files ..
but have the problem
Call to undefined function: dbase_open() in



-- 
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] use php Convert between(foxpro) `.dbf' files and MySQL

2001-08-30 Thread yang

use php Convert between(foxpro) `.dbf' files and MySQL
thk



-- 
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] use php Convert between(foxpro) `.dbf' files and MySQL

2001-08-30 Thread yang

use php Convert between(foxpro) `.dbf' files and MySQL
thk



-- 
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] Connect with user and pwd from PHP to MySql !!!

2001-01-11 Thread Hsieh, Wen-Yang


http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#GRA
NT

- Original Message -
From: "Yoeri De Bruyn" [EMAIL PROTECTED]
To: "phpGeneralList (E-mail)" [EMAIL PROTECTED]
Sent: Thursday, January 11, 2001 1:24 AM
Subject: [PHP] Connect with user and pwd from PHP to MySql !!!


Hi,

I've been looking on the cool web, but up till now I got only complex
explanations about how to create users in mysql.
I know it's more a MySQL question, but since lots of you are using this
DB, maybe someone can just send me an example on how to create on a
proper way (straight forward) users. The meaning is to consolidate the
DB like:

$connection = mysql_connect("localhost","nobody","dummy")
or die("Couldn't connect to server.");
$db = mysql_select_db("searchDB", $connection)
or die("Couldn't select database. Mysql said: "
.mysql_error());

I tried to add a user with password and host in the myql database and
supposed to be able to use thatone for the searchDB database?

Hope this doesn't sound to stupid at all!

Thanks a lot for any trick or usefull example!
Yoeri.

--
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]




Re: [PHP] PHP newbie question

2001-01-10 Thread Hsieh, Wen-Yang


- Original Message -
From: "Neil Zanella" [EMAIL PROTECTED]
To: "Hsieh, Wen-Yang" [EMAIL PROTECTED]
Cc: "PHP General Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, January 10, 2001 1:11 PM
Subject: Re: [PHP] PHP newbie question



 On Wed, 10 Jan 2001, Hsieh, Wen-Yang wrote:

  "" is false.

 The following three seem to be the same in PHP3:

 1) false
 2) ""
 3) 0

zero and an empty string were understood to be false.  Still they are
different.


 I guess that "" is automatically cast to 0 or to false
 wherever an integer is required. Where can I find the
 exact casting rules in PHP3/4 ?

http://www.php.net/manual/language.types.type-juggling.php#language.types.ty
pecasting


 Thanks,

 Neil



-- 
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]