ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The company I work in has a directory of all the websites of a certain business category.. it is written in php and connected to a mysql database that contains the data that is frequently updated....while another company's website has wide exposure..so the deal was to include our directory in their website....
They gave me a skeleton of their asp site with a note somewhere "your code goes here"...
I had already tailored a php page that would be included in their site....
1- Can I include a php code within asp..."Note however,that the include file should call a php file on our server that will be executed on our server and the results will be displayed in the visitor's browser.
<--#ASP include "http://www.php-page.com/directory.php" -->
I know it sound weird...but I have to make it work someway....
Thanks for your reply...Iam a step nearer to my solve my problem ..now ...
Ive used this code:
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
GetConnection.Open "get", "http://www.thedaleel.com/index_test.php", False
MyString = GetConnection.responseText
Ive pasted this code into the asp page...and it showed in the status bar that www.thedaleel.com is loading...so that should have worked..but the problem is that the ouput was not displayed on the asp page..i.e. the images and text of the requested php page did not show up in the asp page...
Errmmm... I'm not an expert but, try ending your ASP (I don't know any ASP so... What I mean is like ?> thats for ending PHP but do that but for ASP) and then <?php include("yourphpfile"); ?> And then after start back your ASP. I was doing that for HTML I don't know if it's the same thing for ASP. As I say, I'm not an expert.
Ive pasted this code into the asp page.....but the problem is that the ouput was not displayed on the asp page
....well, he ASP code is just creating a string variable, so you would need to output the string in order to see it. (hehe... I didn't say the example code was perfect! ... adapt it as per requirements )
Something like: document.write(MyString) should do the trick.
ASP, PHP, JSP, ASPX, CFM, and so forth are all examples of "server side scripting".
When your web client requests a ".php" page from an Apache server, for example, the server must have been configured to:
a) recognize the .php file suffix the web client requested of it, and
b) Pass the page (your "source code") to the appropriate interpreter program (either a standalone php program or an Apache PHP plug-in).
The interpreter parses (executes) the page, and the results are passed back to the client.
So far, so good.
But how can the SAME interpreter handle DIFFERENT languages?
Believe it or not, the answer is "sometimes: it can!".
But in your case, I suspect you'll quickly reach a point where you need EITHER .asp OR .php code, where you will NOT be able to co-mingle the two languages on the same page.
Hopefully I'm being overly pessimistic, and you won't reach this juncture. But have you considered using frames?
....Hopefully I'm being overly pessimistic, and you won't reach this juncture. But have you considered using frames?
The idea here is to ensure the two pages run separately, but that the one includes the output of the other. The two languages don't have to intermix at all.
I've done it myself (when I was required to use an existing perl program inside a PHP system), so it can be done without doing anything special: Just make a http request, even to localhost, and the server will parse and execute the page before giving you the processed output. So it doesn't matter what language it was written in; all your calling program ever sees is the finished html, which can then be included in your page's final output however you see fit.
The only downside is that making all those http requests can be a bit heavy on server resources, but if you really do need to mix your languages, it is a good solution.