Hi, Guys:
Here is a strange scenario that I am attempting to do. I am trying to
extract some information from an external source on a different server, and
then include some of the external calculations as I am running scripts on a
local machine.
Below is my script snippet:
// Get
[snip]
foreach ($lines2 as $line_num = $line2) {
echo pLine #b{$line_num}/b : . htmlspecialchars($line2) .
/p;
}
include ('http://www.mysite.com/calculate.php');
My problem is that when I use a blank file that only has
?php include 'http://www.mysite.com/calculate.php'; ?
The code
From: Jay Blanchard [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:10 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
[snip]
foreach ($lines2 as $line_num = $line2) {
echo pLine #b{$line_num}/b : . htmlspecialchars
Wei, Alice J. wrote:
From: Jay Blanchard [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:10 PM
To: Wei, Alice J.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
[snip]
foreach ($lines2 as $line_num = $line2) {
echo pLine #b{$line_num}/b
From: Jim Lucas [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:32 PM
To: Wei, Alice J.
Cc: Jay Blanchard; php-general@lists.php.net
Subject: Re: [PHP] Include Problem
Wei, Alice J. wrote:
From: Jay Blanchard
On Tue, Jun 24, 2008 at 1:32 PM, Jim Lucas [EMAIL PROTECTED] wrote:
Make sure you have these enabled
allow_url_fopen = On
allow_url_include = On
In addition to what Jay and Jim already correctly suggested, you
may also want to try this at the top of your files to see if there are
any
] Include Problem
On Tue, Jun 24, 2008 at 1:32 PM, Jim Lucas [EMAIL PROTECTED] wrote:
Make sure you have these enabled
allow_url_fopen = On
allow_url_include = On
In addition to what Jay and Jim already correctly suggested, you
may also want to try this at the top of your files to see
On Tue, Jun 24, 2008 at 1:55 PM, Wei, Alice J. [EMAIL PROTECTED] wrote:
Hi,
This is the error I got:
Warning: include() [function.include]: URL file-access is disabled in the
server configuration in C:\Inetpub\wwwroot\read.php on line 29
Warning:
From: Daniel Brown [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:59 PM
To: Wei, Alice J.
Cc: Jim Lucas; Jay Blanchard; php-general@lists.php.net
Subject: Re: [PHP] Include Problem
On Tue, Jun 24, 2008 at 1:55 PM, Wei, Alice J. [EMAIL PROTECTED] wrote
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:04 PM
To: Daniel Brown
Cc: Jim Lucas; Jay Blanchard; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
From: Daniel Brown [EMAIL
: php-general@lists.php.net
Subject: RE: [PHP] Include Problem
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:04 PM
To: Daniel Brown
Cc: Jim Lucas; Jay Blanchard; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:39 PM
To: Boyd, Todd M.
Cc: php-general@lists.php.net
Subject: RE: [PHP] Include Problem
Hi,
Thanks for the clarifcations.
I have two more questions regarding this issue
-Original Message-
From: Boyd, Todd M. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 1:48 PM
To: Wei, Alice J.
Cc: php-general@lists.php.net
Subject: RE: [PHP] Include Problem
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday
From: Boyd, Todd M. [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 2:53 PM
To: php-general@lists.php.net; Wei, Alice J.
Subject: RE: [PHP] Include Problem
If you are trying to include() a remote file via HTTP, the remote
server
will (most likely
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 3:11 PM
To: Boyd, Todd M.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
From: Boyd, Todd M. [EMAIL PROTECTED]
Sent: Tuesday, June
Alice,
If you simply need to execute a remote PHP script and pass variables,
you could do it behind-the-scenes with cURL or AJAX, and pass the
variables in the url (i.e.,
http://www.mysite.com/script.php?param=value). cURL is capable of
retrieving the page (read: the results of the executed
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 3:51 PM
To: Boyd, Todd M.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
Alice,
If you simply need to execute a remote PHP script and pass variables,
you could do
.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 3:51 PM
To: Boyd, Todd M.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
Alice,
If you simply need to execute
-Original Message-
From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 4:07 PM
To: Boyd, Todd M.; php-general@lists.php.net
Subject: RE: [PHP] Include Problem
---8--- snip
I think that the variables passed to will be used by that code
to
do perform
There is also a set_include_path function, I do believe.
On Wed, December 6, 2006 4:26 am, Ashley Hales wrote:
I am trying to use includes on a free php server but I cannot set the
includes_path myself. Consequently when I try to include common
elements or
library files I run into trouble as
I am trying to use includes on a free php server but I cannot set the
includes_path myself. Consequently when I try to include common elements or
library files I run into trouble as I am unable to store or gain acesss to a
central includes folder for the entire of my website to access. Is
Use ini_set or an .htaccess file - try the first, and if that doesn't work
use an .htaccess file if you have them enabled in the server (and it's
Apache of course!).
On 12/6/06, Ashley Hales [EMAIL PROTECTED] wrote:
I am trying to use includes on a free php server but I cannot set the
Greetings everyone,
Thanks for the help in advance.
PHP version is 4.3
I have set a variable and building a string that will be used later in
my php file.
The string is a table. Within this table I want to call another php file
using include for a
pulldown menu. The problem is the
On Thu, May 4, 2006 1:46 pm, Jef Sullivan wrote:
I have set a variable and building a string that will be used later in
my php file.
The string is a table. Within this table I want to call another php
file
using include for a
pulldown menu. The problem is the included file is not showing
Ups, I forgot to reply to everyone again, sorry.
-- Forwarded message --
From: Martin Alterisio [EMAIL PROTECTED]
Date: 16-abr-2006 13:53
Subject: Re: [PHP] Include Problem
To: Shaun [EMAIL PROTECTED]
You're using an absolute path to the file, maybe what you really meant to do
Hi,
I am having problems with an include statement, i am using the following
statement in an effort to include a footer file on my page:
include(/cms/templates/footer.php);
However I get the following error:
Warning: main(/cms/templates/footer.php): failed to open stream: No such
file or
Hi,
I am having problems with an include statement, i am using the following
statement in an effort to include a footer file on my page:
include(/cms/templates/footer.php);
However I get the following error:
Warning: main(/cms/templates/footer.php): failed to open stream: No such
file or
Try
include($_SERVER['DOCUMENT_ROOT'] . /cms/templates/footer.php);
maybe?
Dan
---
http://chrome.me.uk
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: 15 April 2006 20:05
To: php-general@lists.php.net
Subject: [PHP] Include Problem
Hi,
I am having
Shaun wrote:
Warning: main(/cms/templates/footer.php): failed to open stream: No such
file or directory in /home/m/y/mysite/public_html/cms/news/index.php on line
38
Most assuredly the file isn't there (do you have the include path set?)
or the permissions are not sufficient to open the
Mark Charette [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Shaun wrote:
Warning: main(/cms/templates/footer.php): failed to open stream: No such
file or directory in /home/m/y/mysite/public_html/cms/news/index.php on
line
38
Most assuredly the file isn't there (do you have
-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: 15 April 2006 20:05
To: php-general@lists.php.net
Subject: [PHP] Include Problem
Hi,
I am having problems with an include statement, i am using the following
statement in an effort to include a footer file on my page:
include(/cms/templates
At 8:03 PM +0100 4/15/06, Shaun wrote:
Hi,
I am having problems with an include statement, i am using the following
statement in an effort to include a footer file on my page:
include(/cms/templates/footer.php);
However I get the following error:
Warning: main(/cms/templates/footer.php):
This may sound dumb, but i have been up all night going through
php/apache docs, and still have not found an answer..
Throughout a site i need to include files that are scattered in subdirs,
sometimes up in the dir tree, sometimes down. Bad design i know but i
have to live w/ it...
Problem
Nuno,
Have you considered $_SERVER['DOCUMENT_ROOT']?
David
Nuno Trancoso wrote:
This may sound dumb, but i have been up all night going through
php/apache docs, and still have not found an answer..
Throughout a site i need to include files that are scattered in subdirs,
sometimes up in
Check this out
http://uk2.php.net/reserved.variables
DOCUMENT_ROOT will give you the root of your site
-Original Message-
From: Nuno Trancoso [mailto:[EMAIL PROTECTED]
Sent: 09 January 2006 14:56
To: php-general@lists.php.net
Subject: [PHP] include() problem
This may sound dumb, but i
Here's a snippet of what's at the start of most of my php files:
$pagetitle = Lily Articles;
$pagefname = __FILE__; // for later logging
$pagedocroot = $_SERVER['DOCUMENT_ROOT'];
require_once ($pagedocroot/include_db/db_connect.php);
require_once ($pagedocroot/include/funcs.php);
Hope that
On maandag 1 december 2003 15:23 Rasmus Lerdorf told the butterflies:
On Mon, 1 Dec 2003, Wouter van Vliet wrote:
?php
print !!!;
ob_start();
include 'http://server.com/test/echo.php';
$XML = ob_get_clean(); // or use ob_get_contents(); and
ob_end_clean() for PHP 4.3 print ???;
Hi!
I'm having a problem with including files. What I want to achieve is to
execute a PHP-script on another server, and then to include the result
(which will be XML-output) in another PHP-script (currently on my local
computer).
On the server I have the file http://server.com/test/echo.php
Victor Spng Arthursson wrote:
Hi!
I'm having a problem with including files. What I want to achieve is
to execute a PHP-script on another server, and then to include the
result (which will be XML-output) in another PHP-script (currently on
my local computer).
On the server I have the file
On Mon, 1 Dec 2003, Sophie Mattoug wrote:
Victor Spng Arthursson wrote:
Hi!
I'm having a problem with including files. What I want to achieve is
to execute a PHP-script on another server, and then to include the
result (which will be XML-output) in another PHP-script (currently on
Rasmus Lerdorf wrote:
On Mon, 1 Dec 2003, Sophie Mattoug wrote:
Victor Spång Arthursson wrote:
Hi!
I'm having a problem with including files. What I want to achieve is
to execute a PHP-script on another server, and then to include the
result (which will be XML-output) in another
On Mon, 1 Dec 2003, Wouter van Vliet wrote:
?php
print !!!;
ob_start();
include 'http://server.com/test/echo.php';
$XML = ob_get_clean(); // or use ob_get_contents(); and ob_end_clean() for
PHP 4.3
print ???;
print '[Between this you'll get your XYZ]';
print $XML;
print '[Between this
Hi,
I have a weird problem which must be stupid for sure. I'm trying to do
an include in my code run as a cgi. The include works fine in the
form:
include (directory/file);
even it works as:
include (directory/../directory/file);
but it doesn't work as:
include (./directory/file);
nor
Few days ago I asked the same question and got several excellent answers
that helped me to solve the same problem - check the mailing list for
'including files from different sub directories' on 24-10-2003.
Nevertheless all those suggestions helped me to solve the problem from a
normal browser
I have a similar question/problem. However, I want to use an external
email template as it were, so that the sales guys can edit it as they
like and simply shuffle the three variables around that they need
$username, $password, $code (either with or without the ?php ? tags).
I don't want them
Hi,
i am trying to make my work a little easier when editing the appearance of
a news site i am building. As it is, everytime i want to change the looks
of how each news appears, i have to edit inside the print(' '); which is
annoying, because of the backslash with problem thing(when i
Use a here-doc:
echo EOB
br[$data] br $titulo br($user)br $intro br $texto
brbr (comentarios=$contador)brbrhr size=1 width=90%br
EOB;
-Rasmus
On Fri, 27 Dec 2002, Pag wrote:
Hi,
i am trying to make my work a little easier when editing the appearance of
a news site i am
Hi,
I have an issue with including a file accross my web server from a
separate site on that server served on another port.
- explanation
my php website runs off IIS port :80 (unfortunately IIS is employers
decision not mine )
- I have a web spider running off port :
both
On Wed, 24 Oct 2001 08:03, brendan wrote:
Hi,
I have an issue with including a file accross my web server from a
separate site on that server served on another port.
- explanation
my php website runs off IIS port :80 (unfortunately IIS is employers
decision not mine )
- I
Uni runs solaris/unix
faculty runs iis
world of political pain and anguish..
view source brings up a blank screen ..
ta
brendan
David Robley wrote:
On Wed, 24 Oct 2001 08:03, brendan wrote:
Hi,
I have an issue with including a file accross my web server from a
separate site on
On Wed, 24 Oct 2001 10:02, brendan wrote:
Uni runs solaris/unix
faculty runs iis
world of political pain and anguish..
view source brings up a blank screen ..
ta
brendan
OK - bit of straw grasping; you do have URL-fopen-wrappers enabled; try
assigning the result of the include to a
I've got a very odd problem. I'm trying to include 'DB/mysql.php', from
the /usr/lib/php directory, and it's not working. My include_path is set
properly (.:/usr/lib/php) and when I do
'print_r(ini_get(include_path));' it prints it properly. But when I
try and do an include, I get the following
If you put the file into the include directory specified in the php.ini
(.:/usr/lib/php) then I believe you should do:
include(mysql.php);
NOT
include(DB/mysql.php);
Someone please correct me if I'm wrong.
I've got a very odd problem. I'm trying to include 'DB/mysql.php', from
the
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 12:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...
If you put the file into the include directory specified in the php.ini
(.:/usr/lib/php) then I believe you should do:
include(mysql.php
Check the permissions on both the directory and the file, so that they are
accessible to 'nobody' (or whomever PHP is running as). I'm not sure what to
make of the empty include path in the error message.
Kirk
I've tried including just a file that was in the /usr/lib/php
directory.
No
Checked that. Plenty of permissions.
Anyone else have any idea?
-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...
Check the permissions on both the directory
PROTECTED]]
Sent: Thursday, September 20, 2001 2:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...
Checked that. Plenty of permissions.
Anyone else have any idea?
-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 1:48 PM
Hi
I have a little Problem with include.I want to include a txt file in every php file on
the server but some php files are in other directories and dont include this txt file.
Example :
Url for the txt file : www.domain.com/include/incl.txt
So www.domain.com/index2.php includes the txt file
58 matches
Mail list logo