Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2003, 03:01 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default include php inside the asp file

I have a rather silly question.
Can I have a php include file in an asp file?
I mean that the main page is asp. But I 've found some excellent web statistics in php, i want to use them, I am not satisfied from asp script statistics.
All i need(i wish) to do is to include a php file in the file i want to track statistics. No other relations between the two specific files.
Can I include php inside the asp file?
If not, what can i do?

Thanks in advance

 
Old November 25th, 2003, 03:35 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

when you use #include in ASP, what happens is the server takes all the code files and puts them together into one long script. This includes the originally requested ASP, and any include files. The important thing is that all those files are being processed by the ASP script engine. Any file you include will get processed by the script engine (regardless of the file extension). So it will process anything between <% and %> within that file as if it were in the original ASP file.

Point of this babble is that if you #included a PHP file, most likely you'll end up with PHP script bleeding onto your page because ASP will ignore the <?php ...?> tags.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old November 25th, 2003, 03:51 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think your response is what i needed. Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
setup database connection include file in PHP crmpicco PHP Databases 2 September 30th, 2007 04:18 PM
difference between include file & include virtual crmpicco Classic ASP Basics 2 January 23rd, 2006 11:50 AM
Virtual Include PHP file in HTML aingalsbe PHP How-To 0 May 3rd, 2004 10:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.