[PHP] Session not expiring
All, My session is not expiring and I believe that I set this correctly. I'm looking for a 15 minute expiration time. My current setting: session.cookie_lifetime = 900 ; lifetime in seconds of cookie ; or if 0, until browser is restarted Is this the correct why to achieve this? If so what else can it be? Thanks, -p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP4 html email
All, I'm building a tool that takes form input and sends out an html email with a word doc attached. It sends the text and html version of the email but I can't open the attachment. It opens blank. Anyone have a thought or two about this? if ($attachment) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); // add the MIME data $str .= "--" . $boundary . "\r\n"; $str .= "Content-Type: application/octet-stream; name=\"" . $attachment ."\"\r\n"; $str .= "Content-Transfer-Encoding: base64\r\n"; $str .= "Content-Disposition: attachment; filename=\"" . $attachment ."\"\r\n\r\n"; $str .= $data . "\r\n"; } thanks, -p -- 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] HTML Email attachment problem
All, I'm building a tool that takes form input and sends out an html email with a word doc attached. It sends the text and html version of the email but I can't open the attachment. It opens blank. Anyone have a thought or two about this? if ($attachment) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); // add the MIME data $str .= "--" . $boundary . "\r\n"; $str .= "Content-Type: application/octet-stream; name=\"" . $attachment ."\"\r\n"; $str .= "Content-Transfer-Encoding: base64\r\n"; $str .= "Content-Disposition: attachment; filename=\"" . $attachment ."\"\r\n\r\n"; $str .= $data . "\r\n"; } thanks, -p -- 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] Storing a object in the session??
All, I really need help on this one... I have a class called "Profile" and I want to store the properties of this class in the session after I give them values shown below: Step 1: // set properties of class $objProfile = new Profile('1', 'John', 'Doe') ; // store object in session $_SESSION["ProfileObj"] = $objProfile; This is what my session file looks like: !SESSION|ProfileObj|O:7:"profile":5:s:7:"staffId";s:1:"1";s:9:"firstName";s: 5:"John";s:8:"lastName";s:6:"Doe";} Step 2: Then I would like to access them from another page. // Try to print the session object print_r($_SESSION[ProfileObj]); Results: __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => profile [staffId] => 1 [firstName] => John [lastName] => Doe ) Is there a way to store this in the session successfully and if so how can I do access it later? Thanks, -p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php