在Kohana PHP中放置图像文件夹的位置?

时间:2021-11-14 18:01:42

I have a page with some HTML in it. and I need to set the src property to the location of pictures.

我有一个页面,里面有一些HTML。我需要将src属性设置为图片的位置。

How can I achieve that with Kohana PHP ?

如何使用Kohana PHP实现这一目标?

Thanks.

谢谢。

1 个解决方案

#1


3  

It depends on where the images are located. In a standard Kohana install, the files are located in your document root and are accessible with the url::file() call, eg:

这取决于图像的位置。在标准的Kohana安装中,文件位于文档根目录中,可以通过url :: file()调用访问,例如:

<?php echo url::file("images/foo.gif") ?>

would refer to:

会指:

http://example.com/images/foo.gif

Reference: http://docs.kohanaphp.com/helpers/url#file

参考:http://docs.kohanaphp.com/helpers/url#file

#1


3  

It depends on where the images are located. In a standard Kohana install, the files are located in your document root and are accessible with the url::file() call, eg:

这取决于图像的位置。在标准的Kohana安装中,文件位于文档根目录中,可以通过url :: file()调用访问,例如:

<?php echo url::file("images/foo.gif") ?>

would refer to:

会指:

http://example.com/images/foo.gif

Reference: http://docs.kohanaphp.com/helpers/url#file

参考:http://docs.kohanaphp.com/helpers/url#file