ted_chou12 Posted January 2, 2007 Share Posted January 2, 2007 can require accept full url address? eg. htp://test.com/test.phpbecause it didnt work for me, by the way, what i am trying to require is a mail.php script, so if that maybe the problem, please let me know, thanksTed Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/ Share on other sites More sharing options...
dcro2 Posted January 2, 2007 Share Posted January 2, 2007 If you include an external address, you will only be including the HTML source of it. The php file has to be in the local server in order to include the source of it. Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/#findComment-151141 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 thanks Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/#findComment-151144 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 what if i urgently need the mail php function but my host server does not support it? What i was trying to do previously was to get the current page to include the mail function on another host server that supports it. But now it doesnt seem to work so i want to find another way outThanksTed Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/#findComment-151153 Share on other sites More sharing options...
dbo Posted January 2, 2007 Share Posted January 2, 2007 Can't include it but if someone had a generic script out there you could call it with your data.For example assume there is a script that sends email that sits on a different server. http://something/[email protected]&[email protected]&subject=SomethingYou could could assign the varialbes and call the script assigning your own variables.$from = "[email protected]";$to = "[email protected]";$subject = "testing123...";header("location: http://something/send_email.php?from=$from&to=$to&subject=$subject");Likewise, you could set your html form to post to that url....Dunno that you'll find such a generous script out there though... Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/#findComment-151197 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 hey, thanks, but cant i make one by myself, like:<?php $headers = "MIME-Version: 1.0rn";$headers .= "Content-type: text/html; charset=iso-8859-1rn";$headers .= "From: myname<$from>rn"; $headers .= "Return-Path: <$return>";if (mail($to, $subject, $body, $headers)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); }?>I upload this to the server that works for mail script, and then assign the variables through either the url or session will do.This is a great idea, thanks :DTed Quote Link to comment https://forums.phpfreaks.com/topic/32511-about-require-function/#findComment-151341 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.