douluoxiao2286 2018-12-25 19:11
浏览 4
已采纳

尝试在路径中使用$ value来移动基于此php文件的文件

I am trying to get the file to upload an image or audio file to the following directory

$dir='sites/default/documents/"$patientID"/' but I don't know how to use the exact syntax with the $ sign inside a path.

I used the get method to get the patientID from the controller but still nothing is working

  • 写回答

2条回答 默认 最新

  • dongquan8753 2018-12-25 19:15
    关注

    Use this instead : $dir="sites/default/documents/$patientID/";

    In your case the variable is considered as a text.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 蓝桥oj3931,请问我错在哪里
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥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美术毛发渲染