English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a file: "top.php" in my main directory.. how can i include this php(top.php) in another file [example/index.php]

2006-09-27 19:21:27 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

if you want to include the "top.php" file in "example/index.php" file just do the following in index.php :

include("../top.php");

or instead of include you can use include_once, require or require_once.

Good Luck...

2006-09-28 01:38:21 · answer #1 · answered by Lunatic T 2 · 0 0

?>php
include "top.php"; or
require "top.php"; or
include_once "top.php"; or
require_once "top.php";

2006-09-28 02:52:09 · answer #2 · answered by tep 2 · 0 0

include '../top.php';

__________

2006-09-29 12:34:57 · answer #3 · answered by NC 7 · 0 0

fedest.com, questions and answers