Jump to content

Recommended Posts

Hello,

 

we use this when we are here of a site ... "www.x.com/home" and we want to include a file which is here "hello/hello_world/home/hello.php"

<?php
include ("hello/hello_world/home/hello.php");
?>

 

but when we are here of a site "hello/hello_world/home/hello.php" how do we include this "www.x.com/home"

this way?

<?php
include ("http://www.x.com/home/index.php");
?>

 

I am novice so be kind with me! ;D

 

Thanks

Ghosh

Link to comment
https://forums.phpfreaks.com/topic/65754-solved-include-syntax/
Share on other sites

for

<?php
include ("http://www.x.com/home/index.php");
?>

to work, your need allow remote include to be turned on in the php.ini

 

allow_url_include On

 

this directive did not exist until php 5.2.1

1) you cannot use it with versions prior to 5.2.1

2) You’ll need to add it to your php.ini, as you probably won’t find it in there already

3) allow_url_fopen has to be enabled

4) This has to be in the php.ini server-side, and not the .htaccess

Link to comment
https://forums.phpfreaks.com/topic/65754-solved-include-syntax/#findComment-328475
Share on other sites

Actually the problem that I am facing is of this kind..

i have a form at this location:

www.x.com/home/health/health.php

 

now I want the form to send me information at

www.x.com/scripts/visitors/comments/connect.php

 

How do I use the include syntax in "www.x.com/home/health/health.php"?

 

some thing like this one

<?php
include("../../connect.php");
?>

Link to comment
https://forums.phpfreaks.com/topic/65754-solved-include-syntax/#findComment-328484
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.