SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast daverozelle's Avatar
    Join Date
    Mar 2003
    Location
    Western, PA - USA
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP include FILE (Like in PHP)

    Hello. I am not an ASP coder, but I am familiar with PHP. I am working with a company that uses SQL/ASP for their web-based database system for tracking information. My question is this:

    Is there a way to 'include' a single asp page that would contain basic site format and database connection information so that the connects, etc wouldn't have to be coded into each page?

    I am not sure if this will work because I see that some reports are using direct calls in the asp page that calls the report so that call links to the DB and then a stored procedure.

    Does that mean that a single generic db call in an included page won't work?

    Finally, the system is setup for only this one company, internally. I am on board to help them convert their system to be turn-keyed out and leased to other companies in their industry. Thus, why I am making their design more flexible for replication.

    Any other suggestions to consider in moving an internal SQL/ASP system into a much more flexible CMS-style system?

    Thank you for your time and effort.

  2. #2
    SitePoint Addict rokc's Avatar
    Join Date
    Oct 2004
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup there is
    Code:
    <!--#include file="includefilehere"-->

  3. #3
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Also make sure that line of code is OUTSIDE of your ASP tags:

    Code:
    <!--#include file="includefilehere"-->
    <%
    'blah
    %>

  4. #4
    SitePoint Member
    Join Date
    May 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi !
    I'd like to include a remote php file,
    that echo something.

    Can it be possible ?
    Thanks in advance

    Glam

  5. #5
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you wanting to pull a file from someone elses web site? You can use XMLHTTP but with regards to using the coding I'm not sure whether that can be done, I've never tried it.

    If your wanting to pull a file from your own web site, the process above is the required.

    Gav


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •