Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by mdevelle

  1. I fussed around with setting up a "Contact Us" page in my site and came up with this PHP script, with the help of Essential PHP Tools (D. Sklar, apress books) and the PEAR Mail Extension from the PEAR Website. I used a form in the final version, but the basic mechanics are here: <?php require 'Mail.php'; \\ From the PEAR mail package $mailer =& Mail::factory('sendmail'); \\ Create object using the sendmail driver $to = 'addressee@wherever.com'; \\ Where to send it $headers = array('From' => 'sendermailname@senderaddress.com', 'Subject' => 'Hungry?', 'Cc' => 'sendheretoo@anotheraddress.com'); /* The cc: does not work right ... yet */ /* Create a body of text */ $body=<<<_MSGx_ Are you hungry? Wouldn't you like a cold, sweet ice cream cone? Why not stop by your local ice cream parlor today for a few scoops of Guava Mint Bouillon? Sincerely, Your local ice cream booster _MSGx_; $res = $mailer->send($to, $headers, $body); \\ the send() method does the work // If the message can't be sent, send() returns a // PEAR::Error object if (PEAR::isError($res)) { print "Couldn't send message: " . $res->getMessage(); } ?>
  2. You may also want to investigate this site, which offers descriptions and comparisons of MANY content management systems, some of which have a BLOG and WIKI features. The array is dizzying and I have been comparing till I am crosseyed. http://www.cmsmatrix.org/ Here's another site which will allow you to setup and run any of the CMSs that they have installed. This is a clever idea: you run their installation of a third party CMS to see what the admin and setup functions are like and if you can get the look or features you want. Every so many hours, they restore the default install and all your changes are wiped out; the system is ready for another "customer." As you can see by their name, they feature open source stuff. http://www.opensourcecms.com/
  3. Eureka!! Thanks. That was it. Smarty works, smarty doesn't. I knew it had to be something simple and right in front of my nose that I couldn't see.
  4. I am trying to get PHP to run on my website. I created a simple PHP script (test_phpinfo.php) that displays phpinfo() and it runs OK in the root (public_html). when trying to run this same script from a subdirectory (public_html/smarty), I get a 404 error although I can see the file, verify its contents and verify the permissions on the file and directory (using CpanelX File Manager). What am I missing? Thanks
  5. Does it ever make sense to put the PHP included code OUTSIDE of the public_html (document root) area of your website? This implies that the PHP 'include' function can get at it but that prying eyes cannot. This would be a good place for database ID and passwords, for instance. Thanks and I your service!!
  • Create New...