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.

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

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号