Re: [PHP] If-statement

2001-08-29 Thread Darius Ivanauskas

if(!preg_match(/^No[123]$/,$Var))
{
   code
}

--
Darius Ivanauskas

On Wed, 29 Aug 2001, [iso-8859-1] Niklas Lampén wrote:

 Is it possible to write this shorter:
 
 if ($Var != No1  $Var != No2  $Var != No3) {
 code
 };
 
 
 Niklas
 


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

2001-08-20 Thread Darius Ivanauskas

I think you should look at Smarty Template Engine:
http://www.phpinsider.com/php/code/Smarty/
Hope this helps.

Regards
--
Darius Ivanauskas

On Mon, 20 Aug 2001, -:-Doigy-:- wrote:

 Hi Folks,
 
 Can't find an answer in the archives...
 Can php parse DW templates?
 ie. I want only a small amount of code to be editable with the ?php ? tag.
 Dreamweaver places the following code to identify editable regions:
 !-- #BeginEditable Name_of_region --
 \\ editable code here
 !-- #EndEditable --
 
 I don't think PHP will parse the tags and leave them as dw comments only.
 They appear to invoke server functions e.g. !-- #include file= --
 Is there a way to configure PHP to ignore these tags?
 
 Kind regards
 
 Steve
 
 
 
 
 
 -- 
 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] How to resume session by id?

2001-08-17 Thread Darius Ivanauskas



On Thu, 16 Aug 2001, Renze Munnik wrote:

 On Thu, Aug 16, 2001 at 05:41:47PM +0200, Darius Ivanauskas wrote:
  What we have here: registering variable $Session into current session.
  This code works perfectly if session id is propogated normally.
  Bu what i need is to set session_id and session_name so it can resume
  given session by given id. Normally session id is propagating through
  cookie. I have set [ini] session.use_cookie = 0; So it passes GET/POST
  session_id propagating method. And using url as i wrote before it doesn't
  gets session id and starts new session :(( So i need somehow to force it
  to use known session_id and start session using this session_id.
  
  --
  Darius Ivanauskas 
 
 
I can't use cookies because i need to navigate through different dns, and
http--https urls. But you can specify only one cookie domain for session
cookies. :(

--
Darius Ivanauskas

 Why don't you use session.use_cookie. When U use cookies for your
 sessions, you can use whatever URL you like. PHP won't care about
 that, and just use the cookie in order to determine the current
 session.
 
 -- 
 
 * RzE:
 
 -- 
 -- Renze Munnik
 -- DataLink BV
 --
 -- E: [EMAIL PROTECTED]
 -- W: +31 23 5326162
 -- F: +31 23 5322144
 -- M: +31 6 21811143
 -- H: +31 23 5516190
 --
 -- Stationsplein 82
 -- 2011 LM  HAARLEM
 --
 -- 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] How to resume session by id?

2001-08-16 Thread Darius Ivanauskas

I'm getting session id neither from cookie, nor from GET/POST vars,
but by parsing url
like: http://myserver.com/script.php/session_id/blah/blah

How do i resume session by given session_id?

Thanks in advance.
--
Darius Ivanaukas


-- 
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 resume session by id?

2001-08-16 Thread Darius Ivanauskas



On Thu, 16 Aug 2001, Niklas Lampen wrote:

 
 Link in HTML like a
 href=http://www.myserver.com/myfile.php??=SIDLink/a
 And on the myfile.php you have to do this in the beginning of file:
 
 session_start();

In this place it starts a new session because it didn't gets session_id
neither trough GET/POST nor cookie. :

--
Darius Ivanauskas

 if (session_is_registered(Session)) {
   /* This code is run if Session called Session is registered */
 };
 
 
 Hopefully this helps you out.
 
 
 Niklas Lampen
 
 
 
 -Original Message-
 From: Darius Ivanauskas [mailto:[EMAIL PROTECTED]]
 Sent: 16. elokuuta 2001 16:51
 To: [EMAIL PROTECTED]
 Subject: [PHP] How to resume session by id?
 
 
 I'm getting session id neither from cookie, nor from GET/POST vars,
 but by parsing url
 like: http://myserver.com/script.php/session_id/blah/blah
 
 How do i resume session by given session_id?
 
 Thanks in advance.
 --
 Darius Ivanaukas
 
 
 --
 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 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 resume session by id?

2001-08-16 Thread Darius Ivanauskas



On Thu, 16 Aug 2001, Niklas Lampen wrote:

 Did you start the session like this:
 
 $Session = array(
   /* values to array */
 );
 session_start();
 session_register(Session);

What we have here: registering variable $Session into current session.
This code works perfectly if session id is propogated normally.
Bu what i need is to set session_id and session_name so it can resume
given session by given id. Normally session id is propagating through
cookie. I have set [ini] session.use_cookie = 0; So it passes GET/POST
session_id propagating method. And using url as i wrote before it doesn't
gets session id and starts new session :(( So i need somehow to force it
to use known session_id and start session using this session_id.

--
Darius Ivanauskas 


 
 
 -Original Message-
 From: Darius Ivanauskas [mailto:[EMAIL PROTECTED]]
 Sent: 16. elokuuta 2001 18:14
 To: Niklas Lampen
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] How to resume session by id?
 
 
 
 
 On Thu, 16 Aug 2001, Niklas Lampen wrote:
 
  
  Link in HTML like a
  href=http://www.myserver.com/myfile.php??=SIDLink/a
  And on the myfile.php you have to do this in the beginning of file:
  
  session_start();
 
 In this place it starts a new session because it didn't gets session_id
 neither trough GET/POST nor cookie. :
 
 --
 Darius Ivanauskas
 
  if (session_is_registered(Session)) {
  /* This code is run if Session called Session is registered */
  };
  
  
  Hopefully this helps you out.
  
  
  Niklas Lampen
  
  
  
  -Original Message-
  From: Darius Ivanauskas [mailto:[EMAIL PROTECTED]]
  Sent: 16. elokuuta 2001 16:51
  To: [EMAIL PROTECTED]
  Subject: [PHP] How to resume session by id?
  
  
  I'm getting session id neither from cookie, nor from GET/POST vars,
  but by parsing url
  like: http://myserver.com/script.php/session_id/blah/blah
  
  How do i resume session by given session_id?
  
  Thanks in advance.
  --
  Darius Ivanaukas
  
  
  --
  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 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 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] parse and fatal errors don't seem to touch my handler

2001-08-08 Thread Darius Ivanauskas

Any ideas ?

Regards,
Darius Ivanauskas


-- 
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] Error Handling: How to handle fatal errors?

2001-08-06 Thread Darius Ivanauskas

Hello,

I have red all about Error handling but there isn't mentionet that user
cant handle fatal errors :(
I'm writing some application and need to hide all fatal errors from user
and do some hidden reporting/logging such errors. But the
handler function set by set_error_handler() din't get control when fatal
error occurs. 
Is there way to solve my problem.

Regards,
Darius Ivanauskas
--
P.S. Sorry for my english, it isn't my first language .. :(


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