duannian3494 2015-04-22 13:44
浏览 109

Yii1资产的完整路径

I am trying to figure out a way to upload files to a remote server using Yii and a custom component that curls the files to the server. However, i am getting an http_code 0 and i think this is due to the fact that i am trying to send

@/dirtoproject/assets/44d360bd/upload/images/stalker-cityscapes_00324219.jpg;filename=stalker-cityscapes_00324219.jpg;type=text/html

instead of:

@/pathfromc:/ /assets/44d360bd/upload/images/stalker-cityscapes_00324219.jpg;filename=stalker-cityscapes_00324219.jpg;type=text/html

Can anyone explain my how i can get my path right? I am using

protected function getKCFinderUrl()
{
    if ($this->_kcassetsUrl === null)
        $this->_kcassetsUrl = Yii::app()->getAssetManager()->publish(
            Yii::getPathOfAlias('ext.kcfinder') );
    return $this->_kcassetsUrl;
}

to load the kcfinder extension. all help will be appreciated.

  • 写回答

1条回答 默认 最新

  • dsm13698679318 2015-04-22 14:41
    关注

    Adding $_SERVER['document_root'] works just fine.

    评论

报告相同问题?

悬赏问题

  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题