[PHP] How to escape from a function?

2001-01-16 Thread Zenith

... may be I have use a wrong subject, but I can't think a more suitable one
sorry first!

say, I have a function like this
function foo()
{
babababa...
/*at this point, I want to output a lot of html, can I use a ':' to escape
from there?*/
/*I know I can do this is a if construct or for... construct, but I can't do
this at this point*/
/*is there any way for me to do the similar thing?*/
}


And I have one more question, what is the meaning of 'or'?
e.g.
$db=mysql_connect("localhost","root","password") or die ("could not
connect");




-- 
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 escape from a function?

2001-01-17 Thread Zenith

Thanks very much.^^


""Zenith"" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó
942grb$ted$[EMAIL PROTECTED]">news:942grb$ted$[EMAIL PROTECTED]...
> ... may be I have use a wrong subject, but I can't think a more suitable
one
> sorry first!
>
> say, I have a function like this
> function foo()
> {
> babababa...
> /*at this point, I want to output a lot of html, can I use a ':' to escape
> from there?*/
> /*I know I can do this is a if construct or for... construct, but I can't
do
> this at this point*/
> /*is there any way for me to do the similar thing?*/
> }
>
>
> And I have one more question, what is the meaning of 'or'?
> e.g.
> $db=mysql_connect("localhost","root","password") or die ("could not
> connect");
>
>
>
>
> --
> 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] Question about session_register()

2001-01-19 Thread Zenith

I have a question about session_register(), and the following is the
background

When I read a tutorial about session. I know that, once the
"session_start()" is called, it will check the session id. If it's not
valid, create a new one, and it will responible to retrieve the variable.
I also learns about the usage of session_register(). It is a function to
register a variable which will be used throughout a session.

My question is, when the user first visit, a session created, and I register
the variable. On the second, or following hits, to use the session variable,
I also need "session_start", but should I still need to call
session_register() for each hit?

e.g. in script 1, I have a $foo, which should be a session variable, then


in script 2, I still have to use that "$foo", as what I have read from the
tutorial, a session_start() is already prepare that sesson variable for me,
when the script is being parsed,


I know my english is poor, so I use a lot of words to show my question, pls
forgive!!!



-- 
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] Question about new features of PHP4!

2001-01-19 Thread Zenith

When I first meet PHP, it still in 3.0 version. just after I bought a book
abuot PHP3, for a few weeks, PHP4 is released.

for now, I have fimilar with some basic of PHP, and I try to find some
useful tutorial about the PHP4, I fail.

I have look about the PHP manual (pdf version), I find that, there is many
many function is added to PHP4, like, session, corba, shockwave flash, XSLT,
new function for OO But the manual does only provide limited
information. I also heard about Zend, and the xxx engine, but just heard.
not really know what's that.

Can anyone tell me where can I got some article or tutorial, dicussion the
new features in PHP4, online (I am a poor student!)

Right, I still any another two question, it may be cross post,sorry first.

1. What is "Referer" in a HTTP header, what does it mean?

2. If I have question about mySQL, where can I raise question?
Is there any newsgroup which is specially for mysql?

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




[PHP] How to get information from

2001-02-21 Thread Zenith

Hello everbody, if a have HTML document lik this:





How can know whether the user is pressed on the "action1" or "action2" image
button??



-- 
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 can I log message, by syslogd?

2001-02-21 Thread Zenith

As I want to make my application more similar to those linux application, I
am going to see that, is it possible for logging information via syslog or
similar stuff??

I will happy, if you can also give me advice or comment on the efficiency
aspect!!

Thnks



-- 
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] Question about global variables

2001-02-26 Thread Zenith

hello!!

I have a question about variables scope!!



In the above segment, I know that, func2 won't echo anything, even I add
"global var;" in func2.

if, I modified the segment, so, that, it like the following!!


It works!!
However, I am now doing a project, using PHP, I decide to write some
modules, for frequestly used. How ever, these module, have to use some
variables, whose scope is originally on only the upper most level.
If using these way (global all var in each function, even not the
modules functions),
it is very inconivent, as I need to know which variable, should 'global'
it, if I use some module functions,
Is there any convient way to do so???

Zenith


-- 
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] Another question about using shmop!

2001-02-26 Thread Zenith

I read about the php manual, I find that, shmop function can let me use
to store information directly on a shared segment memory.

However, I have some question about these!

Does it provide a faster performance, if I use these rather than store
things in mysql DB, I know this might be stupid, but I have to make sure
this.

And, can I shared the segment ( the data stored inside ) with different
user session.
Would you show me how.

Lastly, is there any further information about using this? the manual
only take a little bit!!

Thanks
Zenith


-- 
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 insert time and date into mysql?

2001-02-28 Thread Zenith

How can I insert time and date into mysql table,
if the table i have to insert has a field of type time, and a field of type
date.

Then how can I insert it in PHP, if I use time() function??



-- 
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 can I log a record??

2001-02-28 Thread Zenith

Hello, I am using PHP4 + mysql + Apache to do a little project,

Now, I want to let the end user can browse the record in a database table.
Someone may want the record, through my php script interface, how can I log
the record,
which the user is editing and going to save it.

Or at least how can other instance process know that the record is using by
some other . So that
the script can warn the user not to edit the record.

Thanks!
Zenith



-- 
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] Question about session data and pop window!

2001-02-28 Thread Zenith

If one of the script ( abc.php ) will generate a pop up (browser) windows,
asking for user confirmation,
then, if the user click on the form button inside that pop up windows,
the form data will submit to also ( abc.php ), then, does the session data
share among this two windows?

Zenith



-- 
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 sort a 2D array?

2001-03-06 Thread Zenith

IF:
$2D[] = array ( 'name'=>"Jacky", 'year'=>"2001", 'tel'=>"982736",
'gender'=>"Male" );
$2D[] = array ( 'name'=>"Jessica", 'year'=>"1999", 'tel'=>"349291",
'gender'=>"Felmale" );

How can I sort the array by 'name' or 'year', or other key efficiently?



-- 
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] Creating a gif thumbnail, without the libgd1.6 or earlier version!

2001-03-06 Thread Zenith

How to create some thumbnail, from orginally a GIF image, to a GIF
thumbnail.
I dun't the libgd 1.6 or before.
Or can we just use libgd1.8 , open a GIF image, and create a thumbnail with
PNG format?



-- 
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] Can I authenicate user with the accounts in passwd and shadow??

2002-03-04 Thread Zenith

I know that, I can use HTTP, or just normal HTML to prompt for user id
and password.
And check against the plain text, encrypted text or Database for the user
account.

But I wonder if I can check the user account against with the
/etc/passwd, i.e. use the system accounts.

For example, in the system, I am account 'snoopy', and password 'isadog'.
In PHP, I prompt for the account, and if the user enters snoopy:isadog,
can I verify this from the /etc/passwd and /etc/shadow???

Zenith

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




[PHP] Is there any existing project doing this??

2002-03-04 Thread Zenith

Hello everybody.

I have try to find out a existing solution for my needs, by fails. Hence
I post this message.

Most of the times, I surf the net and got a lot of useful materials.
Right, I think you should have same experience!! However, I found that I
have gather to much of things and I can't organise it well. Or I forget
where did I put the files. So I want to find out a php packages which
can:
Let me add some records, which is some kind of reference including URL,
Files, Manual, specificaiton, source code and etc...
Sure, a category and search mechanism is wanted.

Does these kind of package available??

Zenith

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




[PHP] Question on subscription

2002-03-06 Thread Zenith

Right, I'd like to post messag to this newsgroup.

However, a auto reply message tell me to subscript the mailing list
first.

Hence, I join the mailing list, but I got near a hundred more mail than.

Can I use this newgroup but don't recieve any mailing list mail from
php.general mailinglist anymore??

Zenith

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




[PHP] How to create user account?

2001-03-29 Thread Zenith

How can I use exec() to create user account?
I try to use exec("useradd testusr");
but nothing happens,
I have set the permission of useradd to  (chmod  useradd) but still 
can't do the desired operation!!

Zenith

-- 
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 can I insert the data into the begining of a text file

2001-08-22 Thread Zenith

I orginal have a function like the following...

  $fp = fopen ( $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt",
"a" );
  fputs ( $fp, "\nDebug message from : $PHP_SELF\n" );
  fputs ( $fp, "\t$message\n\n" );
  fclose ( $fp );

But I found that, the result is, all message is append to the end of a file.
Can I insert the text into the begining of the file??

I think read all the text from the file first, arrang the string variable,
so that the new message can insert, would be a solution. But is it stupid to
do so??




-- 
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 can I insert the data into the begining of a text file

2001-08-22 Thread Zenith

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.
Or , I did a wrong thing again??
My code is like now.
$fp = fopen ( $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt",
"r+" );
 fputs ( $fp, "\nDebug message from : $PHP_SELF at ".strftime("%T on
%D")."\n" );
 fputs ( $fp, "$message\n\n" );
 fclose ( $fp );

"Niklas lampén" <[EMAIL PROTECTED]> ?
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use $fp = fopen($file, "r+");
>
> PHP Manual would have told you this.
>
>
> Niklas
>
> -Original Message-
> From: Zenith [mailto:[EMAIL PROTECTED]]
> Sent: 22. elokuuta 2001 12:39
> To: [EMAIL PROTECTED]
> Subject: [PHP] How can I insert the data into the begining of a text
> file
>
>
> I orginal have a function like the following...
>
>   $fp = fopen
 $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/log/debug_message.txt",
> "a" );
>   fputs ( $fp, "\nDebug message from : $PHP_SELF\n" );
>   fputs ( $fp, "\t$message\n\n" );
>   fclose ( $fp );
>
> But I found that, the result is, all message is append to the end of a
file.
> Can I insert the text into the begining of the file??
>
> I think read all the text from the file first, arrang the string variable,
> so that the new message can insert, would be a solution. But is it stupid
to
> do so??
>
>
>
>
> --
> 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] How to output/ generate doc/xls/ or access file?

2001-09-12 Thread Zenith

Right, there is a COM module in the PHP. But it must be used with win32
platform.
Is there any alternatives for linux platform?




-- 
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] May I ask sql question here??

2001-09-18 Thread Zenith

I know that, this is a newsgroup for PHP, but can I ask some SQL question
here?
Or, would you mind point me to a suitable newsgroup for SQL question?



-- 
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: Running virtualhosts under different users

2001-09-23 Thread Zenith

Can you use  and  directives under  directive??
>From the apache manual,  and  directive can be used under
virtualhost directives
It can control the uid and gid of the running httpd process, with different
uid and gid...

Right, you can try it.

"Adam Plocher" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I realize this is more of an apache question, not a php question, but I
> thought you guys of all people, would be able to help me...
>
> I have an apache server setup, hosting a number of sites.  I need one site
> to be ran under a different user so it can execute shell commands via
> system() under that user.  Does anybody know how I can do this?  I
installed
> the suexec module for apache, and either it doesn't work the way I need it
> to, or I just misconfigured it.
>
> I'm baffled, any information would be greatly appreciated.
>
> Thanks
> -Adam
>



-- 
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] using fopen, but warned "permission denied"

2001-01-30 Thread Zenith

I installed my php + apache in my linux box, with compiled the php as an
apache module. any my web server is run as nobody ( by default ).

I try to write some php script in my home directory, in which, I use the
fopen call.
However, I was warned with "fopen("tester.db","w") - Permission denied"

I can only simply change the permission by chmod [directory], but, it is
obivous dangerous.
How can I do?



-- 
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 phpIRC and question about HTML streaming!

2001-02-06 Thread Zenith

I have readying "web application develoment with PHP4.0" by Tabias
Ratschiller and Till Gerken at these days!
In chapter 3, I have talk about creating a IRC client with phpIRC and HTML
streaming,
but it hasn't talk too much about the implementation, also, it haven't talk
much about HTML streaming. He just say HTML streaming can create a interface
which can let the process (running php script) continously output something
to the HTTP client, without close a connection and establish again...

Right, my question is, anyone can give me more info, or pointer for this two
topic?
Especially, the web site which provide the info i need and what type of
browser support HTML streaming?

Thanks!



-- 
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 phpIRC and question about HTML streaming!

2001-02-06 Thread Zenith

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




[PHP] what's the difference between include and require??

2001-02-19 Thread Zenith

Though I have read the manual about these two things, include() and
require(), but I still not very clear about the difference between these??





-- 
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 can I use session variable in a function?

2001-02-19 Thread Zenith

In main.php,
then I use include("xxx.php"), in which, there is a function called temp();
If I use session_start() at the beginging of main.php, after include
statment,
and I cal the temp(), will the temp() function can get the session variable
I have?
Or I need to import it by using "global" in the function def.?



-- 
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] question about multidimension array

2001-02-19 Thread Zenith

Consider the following code:

$ary1 = array ("one","two");
$ary2 = array ("three","four");

$2d_Dimension[] = $ary1;
$2d_Dimension[] = $ary2;

// is $2d_Dimension a 2 dimensional array?

// and the next question, how to get out content of the $2d_Dimension[]
array

while ( list ( $rec_no, $ary ) = each ( $2d_Dimension ) )
{
echo ("Record No $rec_no:");
   while ( list ( $element1, $element2 ) = each ( $ary ) )
   echo "$element1, $element2";
}

// I want to use the above code to print something like
// Record No 0:one, two
// Record No 1:three, four

// But I only got the following
//Record No 0:
//Warning: Variable passed to each() is not an array or object in
d:/project/bizvista/testinc.php on line 27

What's the problem?





-- 
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 determine the parameter is a 1 dimension array or not?

2001-02-19 Thread Zenith

In a self defined function, a one dimension or two dimension array may be
passed,
How can I check that, the passed in array is a one dimension array or a two
dimension array?



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

2001-11-09 Thread Paul - Zenith Tech Inc

I'm hoping somebody has the answer to this!

I have 3 pages, one a normal PHP page, and 2 which are classes.

One class, is a MySQL class I have written to connect/update users, etc
And the other is the manage users on the system.

Is there a way I can get the "users" class to talk to the "mysql" class?

I have this code to make a new instance of the MySQL class (the True means
use persistent connections) and a new instance of the users class

$db = new MySQL(True);
$users = new Users();

I am then using this code to check the list of banned users

$users->CheckBannedUser("spacetowns",$db);

 In the CheckBannedUser function, I have this

$db->sql_query("SELECT user FROM banned_users");

But that does not work, (it works fine when used from the standard PHP page)

Is it not possible to do what I am trying to do?
Or am I doing it all wrong?

Many thanks,
Paul




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

2001-11-12 Thread Paul - Zenith Tech Inc

Thanks for the help Pierre

Paul

"Pierre-Yves" <[EMAIL PROTECTED]> wrote in message
00c001c16940$47db1c90$0100a8c0@py">news:00c001c16940$47db1c90$0100a8c0@py...
> Hello,
>
> what I would do is build the instance of your mysql class in the
constructor
> of the user class
>
> class User{
>   var $db;
>
>   // constructor
>   function User(){
> $this->db = new Mysql(True);
>   }
>
>   // function that show how to use the Mysql class in the User class
>   function foo(){
> $this->db->sql_query("SELECT user FROM banned_users");
>   }
> } // end class
>
> hope it help,
> py
>
>
> - Original Message -
> From: "Paul - Zenith Tech Inc" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 09, 2001 11:26 AM
> Subject: [PHP] Classes Question
>
>
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
> > I have this code to make a new instance of the MySQL class (the True
means
> > use persistent connections) and a new instance of the users class
> >
> > $db = new MySQL(True);
> > $users = new Users();
> >
> > I am then using this code to check the list of banned users
> >
> > $users->CheckBannedUser("spacetowns",$db);
> >
> >  In the CheckBannedUser function, I have this
> >
> > $db->sql_query("SELECT user FROM banned_users");
> >
> > But that does not work, (it works fine when used from the standard PHP
> page)
> >
> > Is it not possible to do what I am trying to do?
> > Or am I doing it all wrong?
> >
> > Many thanks,
> > Paul
> >
> >
> >
> >
> > --
> > 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] Classes Question

2001-11-12 Thread Paul - Zenith Tech Inc

I did have a look in the manual, but I got lost half way through!

I always think it's a good idea to describe the problem well :)

Thanks,
Paul

"Andreas Landmark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Sun, Nov 11, 2001 at 06:09:40PM -, PaulC wrote:
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
>
> Inheritance, let the users class inherit the functions of the mysql
> class, that's the nicest and probably the best way to do it.
>
> Read up on OO in the manual to find out how to do inheritance in PHP.
>
> 
>
> --
> Andreas D Landmark / noXtension
> Every solution breeds new problems.



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

2001-11-12 Thread Paul - Zenith Tech Inc

Thanks Andrew... I basically tried that, but without the ampersand symbols.
I'll give that a try

Many thanks,
Paul

"Andrew Kirilenko" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello!
>
> Try to declare CheckBannedUser as "function CheckBannedUser ($foo, &$db)"
> and call it "$users->CheckBannedUsers("foo", &$db)"
>
> Note ampersand symbols!
>
> Best regards,
> Andrew Kirilenko.
>
> > -Original Message-
> > From: PaulC [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, November 11, 2001 8:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Classes Question
> >
> >
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
> > I have this code to make a new instance of the MySQL class (the True
means
> > use persistent connections) and a new instance of the users class
> >
> > $db = new MySQL(True);
> > $users = new Users();
> >
> > I am then using this code to check the list of banned users
> >
> > $users->CheckBannedUser("spacetowns",$db);
> >
> >  In the CheckBannedUser function, I have this
> >
> > $db->sql_query("SELECT user FROM banned_users");
> >
> > But that does not work, (it works fine when used from the
> > standard PHP page)
> >
> > Is it not possible to do what I am trying to do?
> > Or am I doing it all wrong?
> >
> > Many thanks,
> > Paul
> >
> >
> >
> > --
> > 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] Problem with "<"

2001-11-14 Thread Paul - Zenith Tech Inc

Hi,

I have a text file, which is acting as a template for apache config.
I open the file, and read it in using this bit of code:

   $filename = DIR_TEMPLATES."/apache/subdom.txt";
   $fd = fopen ($filename, "r");
   $template = fread ($fd, filesize ($filename));
   fclose ($fd);

However, the first line is missed off, along with any line beginning with
"<"

For example, this line is missed out:



Does anybody know the way round this??
Or does anybody know why this is happening?

Thanks,
Paul



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

2001-11-21 Thread Paul - Zenith Tech Inc

Using phpinfo() I can see that the header "Last-Modified" exists.

How do I go about accessing the header??

Thanks,
Paul



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