Jump to content
Sign in to follow this  
razirazo

Macam Mana Nak Buat Relative Path

Recommended Posts

camana nak buat?
aku nak config portable upload server (pakai mod_uploader) guna windows..
kalau dalam linux kita cuma perlu buat contohnya... "../../bin/module/upload/mod_uploader.so" untuk refer kepada direktori yang kita nak.
tapi dalam windows aku cuma reti pakai absolute path contohnya.. "c:\server\module\upload\mod_uploader.so"

camana nak guna relative path?, supaya aku boleh run server tu dari pendrive je, dan tak payah ubah config bila run kat machine lain?

aku harap korang paham apa yang aku maksudkan..haha.. :lol: Edited by razirazo

Share this post


Link to post
Share on other sites
aku faham tapi tak reti nak tolong..
kalau guna "../../" tu mcm linux tak leh ek?
sbb kalau php boleh buat camtu je.
xtau la kalau kes ko ni lain caranya..

Share this post


Link to post
Share on other sites
tu la.. aku rasa guna '..\..\file' tu boleh je kot..

cuba usya sini: [url="http://www.computing.net/answers/programming/batch-syntax-help/17431.html"]http://www.computing.net/answers/programming/batch-syntax-help/17431.html[/url]

Share this post


Link to post
Share on other sites
ntah. bila aku buat camtu tak load lak.
bila pakai absolute jadik lak..

first time pakai apache under windows. biasa pakai lighttpd takyah define path pun.

Share this post


Link to post
Share on other sites
ooo..aku baru perasan...ko nak run apache tu dari pendrive ko ek?...so aku delete pos aku sblm ni sebab silap paham :D..

ko perlu setkan ServerRoot tu dulu sebab semua filename yang diberi akan dikaitkan dengan ServerRoot directory...

buang drivename tu...kalau takde drivename, apache akan tambah sendiri bergantung dr mana httpd.exe tu berlari...
so dia jadi macam ni contohnya:

ko punya folder akar agi apache adalah di "F:\server\apache"...
ko punya module duduk dalam "F:\server\apache\modules\upload"...jadi, boleh guna macam ni:
[code]
ServerRoot "/server/apache"
LoadModule mod_uploader modules/upload/mod_uploader.so[/code]

drive F tu akan ditambah sendiri bergnatung dimana httpd.exe tu duduk...kalau dari pendrive pon ok...
aku tak test pun, tapi try la :D Edited by betik

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...