douxuexiao1748 2011-10-10 12:04
浏览 17
已采纳

如何访问php5 / Jquery中的文档根文件?

How can I access an image existing out side of my document root. I give direct path Like this

D:/folder/image.jpeg

But its not displaying. I am using windows OS. My server is LightTPD. My image folder not under any server. Its just inside one folder of my D drive.

I try to create one desktop application using php and jquery. So I am doing like that. Actually I will mount this image folder in a virtual space from there I need to read files. Now for testing purpose I am directly create one folder and creating my application.

  • 写回答

1条回答 默认 最新

  • duandingqi9442 2011-10-10 12:15
    关注

    Not sure what web server you are using - but for Apache you could create an alias :

    DocumentRoot "C:/www/mywebsite"
    ServerName mywebsite
    Alias   /files  "D:/folder"
    

    For Lighttpd use the following syntax :

    alias.url = ( "/files" => "d:/folder" )
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Linux环境下CA证书更新问题
  • ¥15 sqlserver语句提取结果以外数据
  • ¥60 微信小程序如何上传QQ聊天文件
  • ¥300 开发的系统遭到无良商家的破解,请问如何防止再次发生,并追回损失
  • ¥15 java代码写在记事本上后在cmd上运行时无报错但又没生成文件
  • ¥15 关于#python#的问题:在跑ldsc数据整理的时候一直抱这种错误,要么--out识别不了参数,要么--merge-alleles识别不了参数(操作系统-linux)
  • ¥15 PPOCRLabel
  • ¥15 混合键合键合机对准标识
  • ¥100 现在不懂的是如何将当前的相机中的照片,作为纹理贴图,映射到扫描出的模型上
  • ¥15 魔霸ROG7 pro,win11.息屏后会显示黑屏,如图,如何解决?(关键词-重新启动)