RE: Include Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



________________________________________
From: Boyd, Todd M. [tmboyd1@xxxxxxxx]
Sent: Tuesday, June 24, 2008 2:53 PM
To: php-general@xxxxxxxxxxxxx; Wei, Alice J.
Subject: RE:  Include Problem

>
> > If you are trying to include() a remote file via HTTP, the remote
> > server
> > will (most likely) translate the PHP code into the output that it
> would
> > produce if you were to visit the script with a web browser. It
> appears
> > you are trying to grab a PHP file from a remote server and execute
it
> > as
> > code, which won't work--at least not under normal circumstances.
>
> Alice,
>
> If the two Windows machines are on the same network, you can try to
use
> Windows' file sharing to do the job for you. For instance,
>
> include('\\servername\dirname\filename.php');

*cough* ... I meant to double up on those backslashes. I'm not sure if
PHP supports forward-slash file/dir specifications in Windows, but to
double them all up would look like this:

Include("\\\\servername\\dirname\\filename.php");

> Using HTTP from Windows to Windows would yield the same results as
> using
> HTTP from Linux to Windows. You could host the files on a server that
> does not parse PHP, and so they would be transmitted as plain text...
> but then you get into issues of disclosing their contents to parties
> you
> would rather leave in the dark (read: hackers).
>
> You might consider using FTP, SCP, or another behind-the-scenes file
> transfer agent to accomplish what it is you're trying to do. I believe
> PHP already has several functions for use with FTP.

Sorry, I don't think I am intending on passing any file to whatever server.

All I need to do is to have my script be able to execute another program that can allow my  PHP script to pass the variables, so this may be using anything from PHP, Perl to C. I have seen in the PHP manual that there is this command called exec().

Is it possible that I could use something like exec($someurl) to execute the script? I tried doing this in PHP, but it tells me this:

arning: exec() [function.exec]: Unable to fork [http://www.mysite.com/calculate.php] in C:\Inetpub\wwwroot\read.php on line 31

Is there some way I can fix this error somehow? Or, is this not possible either?

Thanks for your help

Alice


Todd Boyd
Web Programmer

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux