php-windows Digest 18 Sep 2004 07:21:26 -0000 Issue 2400

Topics (messages 24589 through 24593):

Re: INCLUDE ASP does Not Work! for PHP - 4.3.4
        24589 by: Gryffyn, Trevor
        24592 by: Phil Driscoll
        24593 by: Phil Driscoll

Re: How can I organise my data from a total amount into tens?
        24590 by: Gryffyn, Trevor

Re: Sending mail through localhost
        24591 by: Manuel Lemos

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
The problem is that the web server looks at the file type and determines
what to do with it before it sends anything to the web browser.

Your .PHP file is being sent to a PHP interpreter which outputs certain
things that get sent to the browser.  What's going to happen in this
case is that ASP code is going to be inserted, sent to the PHP
interpreter and nothing's going to happen....  Or if you have your PHP
set up to see <% %> as PHP, then you'll probably get some kind of
unknown function error.

The reason the .HTM file works ok is that HTML is passed straight
through the PHP interpreter to the browser.


What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp
in that so the web server is pulling a .ASP file without anything else,
therefore interpreting it as an ASP file.

Does any of that make sense?

-TG

> -----Original Message-----
> From: Raj Gopal [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 16, 2004 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
> 
> 
> Hi All,
> 
>  I have included a ASP file in a PHP script as follows
> 
>  <? include 'poll.asp' ?>
> 
> and it does not work! 
> 
> whereas <? include 'AA.htm' ?> works fine
> 
> Appreciate your help for any workarounds or Syntax issues
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
On Thursday 16 September 2004 22:18, Raj Gopal wrote:
> Hi All,
>
>  I have included a ASP file in a PHP script as follows
>
>  <? include 'poll.asp' ?>
>
> and it does not work!

If you want poll.asp to execute and generate some output for inclusion in the 
php script, you could do
<?php
 include('http://wherever.example.com/poll.asp');
?>

But make sure that you are in control of poll.asp and that it cannot generate 
any dangerous php code.

Cheers
-- 
Phil Driscoll

--- End Message ---
--- Begin Message ---
On Friday 17 September 2004 20:36, I wrote:

> <?php
>  include('http://wherever.example.com/poll.asp');
> ?>
A safer option if your asp page does not generate any php code you wish to 
execute would be:

<?php
readfile('http://wherever.example.com/poll.asp');
?>

-- 
Phil Driscoll

--- End Message ---
--- Begin Message ---
Using the MOD (%) operator works great for paging and such.  It gives
you the remainder of a division statement:

If ($itemcount % 10 == 0) echo "Itemcount divisible by 10, starting new
page."


Or us the floor() function to determine what the integer is without the
fractional remainder:

$pagenum = floor($itemcount/10) + 1;

Don't forget that if you're using a database that supports the LIMIT
command in SQL, the it works great for paging output!

Good luck!

-TG

> -----Original Message-----
> From: Daniel Anderson [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 16, 2004 7:40 PM
> To: PHP Mailing List
> Subject: [PHP-WIN] How can I organise my data from a total 
> amount into tens?
> 
> 
> How can I organise my data from a total amount into tens?
> 
> So, say I have a total amount of something like: 50
> 
> I want to organise this so it organises each into 10's
> 
> like this:
> 
> PAGE 1 (01 - 10) | PAGE 2 (11 - 20) | PAGE 3 (21 - 30) | PAGE 
> 4 (31 - 40) | PAGE 5 (41-50) ...
> 
> I basically want to use this function for a guestbook I made,
> 
> I want to organise each post into 10s, so you can click a 
> link and it will select the posts from that group.
> 
> I can get it to select from the group, but what I really want 
> is how to get it do, is how to do the link part:
> 
> "PAGE 1 (01 - 10) | PAGE 2 (11 - 20) | PAGE 3 (21 - 30) | 
> PAGE 4 (31 - 40) | PAGE 5 (41-50) ..."
> 
> So it groups them into 10s so they count up to the total amount...
> 
> If you need me to explain it more please do say :)
> 
> Thanks,
> Dan
> 

--- End Message ---
--- Begin Message ---
Hello,

On 09/17/2004 04:52 AM, W Roothman wrote:
Dear All,

Do I need to install a mail server, such as ArGoSoft Mail Server, on my computer (MS 
XP) in order to prevent this error when sending mail through a form (ref: N: Mail 
functions, PHP manual):

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in c:\inetpub\wwwroot\......sendfeeback.php on line 22

That message means that you need to authenticate to relay the message to your SMTP server. The mail function does not support authentication.


You may want to try this class that comes with a wrapper function named smtp_mail() . It works exactly like the mail() function but it lets you configure the authetication credential so you can relay your messages.

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass



--

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

--- End Message ---

Reply via email to