Re: [PHP] Re: sending HTML (incl. embedded images) to browser
Pardon me, but I don't think he is trying to send an HTML email. I believe he is just asking about making a simple webpage. Relative URLs should be fine and are often preferable for portability. Jordan On Aug 17, 2005, at 7:34 PM, Manuel Lemos wrote: Hello, on 08/17/2005 07:42 PM Jake Sapirstein said the following: > I am a PHP newbie, pardon the elementary question - I am starting out with using print() to send HTML to the browser to be rendered. All is well with text and tables and other HTML formatting, but when trying to send IMG tags, my images aren't getting displayed. > > Is there a good tutorial out there (I can't seem to find it) on how to send HTML to a browser where the HTML includes IMG tags with links to image files? If I need to set up the filepaths with variables I can figure that out, but not sure what functions to use to set the paths up. You need to use absolute URLs for the images. Still, some mail programs and webmail sites disable remote image displaying by default as images may be beacons to spy on users. ALternatively you can embeded images in the actual HTML messages and they always display properly. That is done with MIME multipart/ related messages. You may want to take a look at this MIME message class that can be used to compose messages with embedded images. It comes with an example named test_html_mail_message.php that shows exactly how to do that: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sending HTML (incl. embedded images) to browser
Hello, on 08/17/2005 07:42 PM Jake Sapirstein said the following: > I am a PHP newbie, pardon the elementary question - I am starting out with using print() to send HTML to the browser to be rendered. All is well with text and tables and other HTML formatting, but when trying to send IMG tags, my images aren't getting displayed. > > Is there a good tutorial out there (I can't seem to find it) on how to send HTML to a browser where the HTML includes IMG tags with links to image files? If I need to set up the filepaths with variables I can figure that out, but not sure what functions to use to set the paths up. You need to use absolute URLs for the images. Still, some mail programs and webmail sites disable remote image displaying by default as images may be beacons to spy on users. ALternatively you can embeded images in the actual HTML messages and they always display properly. That is done with MIME multipart/related messages. You may want to take a look at this MIME message class that can be used to compose messages with embedded images. It comes with an example named test_html_mail_message.php that shows exactly how to do that: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sending HTML (incl. embedded images) to browser
Hello, on 08/17/2005 07:42 PM Jake Sapirstein said the following: I am a PHP newbie, pardon the elementary question - I am starting out with using print() to send HTML to the browser to be rendered. All is well with text and tables and other HTML formatting, but when trying to send IMG tags, my images aren't getting displayed. Is there a good tutorial out there (I can't seem to find it) on how to send HTML to a browser where the HTML includes IMG tags with links to image files? If I need to set up the filepaths with variables I can figure that out, but not sure what functions to use to set the paths up. You need to use absolute URLs for the images. Still, some mail programs and webmail sites disable remote image displaying by default as images may be beacons to spy on users. ALternatively you can embeded images in the actual HTML messages and they always display properly. That is done with MIME multipart/related messages. You may want to take a look at this MIME message class that can be used to compose messages with embedded images. It comes with an example named test_html_mail_message.php that shows exactly how to do that: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php