dqxm14187 2015-12-31 04:31
浏览 20
已采纳

我如何在php文档中包含我的LS-XL413内部网驱动器上的文件?

My computer is being filled up with external files that i access via php include/require statements, so I decided to put them on an intranet drive to preserve space. However, well trying to do so I encountered a problem. How do I write a link to a file on an intranet drive?

Here is my include code I have tried: (UPDATE: I tried the echo file_get_contents("foo") method and it still produces an error. Any other ideas?) (UPDATE[1]: How do I map drive letters to a network drive?)

<header>
<div class="branding"> <img src="images/ralogo_monogram.png" alt="Logo">
  <p>Roux Academy<br>
    Art • Media • Design</p>
</div>
<div class="description">
  <h1>Roux Academy 2016 Art Conference</h1>
  <p>Join over 500 hundred of the most creative and brilliant minds of art colleges all around the world for five days of lectures by world-renowned art scholars and artists, and seven days and nights of gallery exhibits featuring the best in contemporary art, including painting, sculpture, and more, in the beautiful halls of Hotel Contempo in the heart of Seattle.</p>
</div>
<?php include "192.168.1.67/share/server_includes/navbar.html"; ?>
</header>
  • 写回答

1条回答 默认 最新

  • douyi1855 2015-12-31 04:45
    关注

    If on Windows, map this intranet drive to a drive letter on your computer. Then include or require the files in your php code like you've always done.

    If on Linux/Unix/Mac OS, mount the drive into a folder on your computer. Then include or require the files in your php code like you've always done.

    Compared to file_get_contents(), this solution lets ypou preserve the distinction between include and require.

    I could not find details on your LS-XL413 drive just from the model name. Give us a link and let us know what OS you are using, so that we can give you more detailed instructions on mapping/mounting the drive.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站