Re: require?fread?fopen?

From: Date: Thu, 22 Jun 2000 14:56:05 +0000
Subject: Re: require?fread?fopen?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2633@lists.php.net to get a copy of this message
instead of echo $html_msg; use eval("?>$html_message"); as long as you have the '<?' & '?>' tags in your string it will work fine. Data Driven Design PO Box 1084 Holly Hill, FL 32125-1084 Phone : (904) 226-8979 URL : http://datadrivendesign.com URL : http://rossidesigns.net ----- Original Message ----- From: Vboy <vboy@bigfoot.com> To: <php-general@lists.php.net> Sent: Thursday, June 22, 2000 9:40 AM Subject: [PHP-GENERAL] require?fread?fopen? | GOAL: I'd like to assign a big HTML contents (with PHP embedded) to a | single | variable so that I can send it as a MIME attachement by email. | | i.e. $my_var = <The whole HTML contents> | | PROBLEM: | I tried saving the HTML+PHP codes into a file called "html_ver.inc", | then read | it with the following commands. | | $filename="./html_ver.inc"; | $fp = fopen("$filename", "r"); | $html_msg = fread($fp,filesize($filename)); | fclose($fp); | | However, when I do "echo $html_msg" within the script, it only outputs | the HTML | codes but the PHP variables inside html_ver.inc doesn't show anything. | | Why? | | (It's too cumsy to assign the whole HTML+PHP contents directly to the | variable $html_msg WITHIN the script... that's why I used the above | method | $html_msg .= "<html><head><title>$topic</title></head>\n"; | $html_msg .= "<body>"; | ... | ) | | Thanks. | Vboy | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net | For additional commands, e-mail: php-general-help@lists.php.net | To contact the list administrators, e-mail: php-list-admin@lists.php.net | |

« previous php.general (#2633) next »