Jump to content
Sign in to follow this  
TOYSЯUS

Nak Include File Dari Previous Root

Recommended Posts

Salam.

Contohnya saya buat local web:
[code].../www/customer/index.php[/code]
dan
[code].../www/customer/index.htm[/code]

-
yang saya tahu, kalau di root yg sama, utk php boleh guna
[code]<?php include 'login.php'; ?>[/code]
utk htm boleh guna
[code]<!--#include virtual="login.htm"-->[/code]

tapi mcm mana saya nak include file login.php yg berada dalam root /www/ ke dalam index.php di root /customer/ tu,
tanpa letak fullpath?
sama jugak, mcm mana untuk file .htm tu?

Tetiba rasa blank pulak kepala ni.

Thanks.

Share this post


Link to post
Share on other sites
just tambah ".." kat depan path..

Current directory : www/customer/index.php

kalau nak up satu directory,

[code]<?php include '../index.php'; ?>[/code]
current directory : www/index.php

kalau nak up 2 directory, just tambah lagi '../../include_file.php'

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...