[PHP] HTTP Headers
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]
[PHP] Problem with
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: VirtualHost xxx.xxx.xxx.xxx 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]
Re: [PHP] Classes Question
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
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. removed a pretty good description of the problem -- 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]
[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]