Home Backend Development PHP Tutorial 万急用thinkphp在html模板里面图片路径如何调用

万急用thinkphp在html模板里面图片路径如何调用

Jun 13, 2016 am 10:08 AM
index public quot

万急用thinkphp在html模板里面图片路径怎么调用
myweb项目名称放在WEB目录下

thinkphp放在myweb下
入口文件:/index.php
模板放在:/Tpl/default/index/,如index.html
图片目录在:/Tpl/default/public/iamges/目录下,如logo.png
在index.html中用到logo.png图片,我给图片设置绝对路径:万急用thinkphp在html模板里面图片路径如何调用.
问题出现了:
我用:http://localhost/myweb/Tpl/default/index/index.html 图片可以正常显示,
但是要在入口文件运行http://localhost/myweb/index.php/index/index/,图片就是不显示,
当然,这两种访问方式,页面内容是可以正常显示的,就是图片显示问题,还有CSS也调用不到了


------解决方案--------------------
在页面万急用thinkphp在html模板里面图片路径如何调用这样用

要么你就设置虚拟主机

http://www.myweb.com => http://localhost/myweb

然后在页面这样用万急用thinkphp在html模板里面图片路径如何调用

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What file is index.html? What file is index.html? Feb 19, 2024 pm 01:36 PM

index.html represents the home page file of the web page and is the default page of the website. When a user visits a website, the index.html page is usually loaded first. HTML (HypertextMarkupLanguage) is a markup language used to create web pages, and index.html is also an HTML file. It contains the structure and content of a web page, as well as tags and elements used for formatting and layout. Here is an example index.html code: &lt

What is the difference between the developer version and the public version of iOS? What is the difference between the developer version and the public version of iOS? Mar 01, 2024 pm 12:55 PM

Every year before Apple releases a new major version of iOS and macOS, users can download the beta version several months in advance and experience it first. Since the software is used by both the public and developers, Apple has launched developer and public versions, which are public beta versions of the developer beta version, for both. What is the difference between the developer version and the public version of iOS? Literally speaking, the developer version is a developer test version, and the public version is a public test version. The developer version and the public version target different audiences. The developer version is used by Apple for testing by developers. You need an Apple developer account to download and upgrade it.

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

what is mysql index what is mysql index Oct 08, 2023 am 11:47 AM

The index in MySQL means index. It is a data structure used to speed up the query of database tables. The index can be compared to the catalog of a book. It stores the values ​​​​of specific columns in the table and the corresponding row positions, making the database more efficient. Locate and access data quickly. The function of the index is to improve query efficiency. Without an index, the database needs to scan the entire table row by row to find matching data. This method will be very time-consuming in large tables. With an index, the database can The required data rows are quickly located in the order, which greatly improves the query speed.

Java function access permission modifier public usage guide Java function access permission modifier public usage guide Apr 26, 2024 am 08:39 AM

The Java public access modifier allows functions to be accessed from anywhere and is used to declare public APIs and define tools and utilities that are shared across packages or classes. The specific usage is as follows: Syntax: public return value type function name (parameter list) {...} Scenario: functions that need to be accessed from anywhere, methods in public APIs, shared tools or utilities

How to solve the deadlock caused by MySQL optimization index merge How to solve the deadlock caused by MySQL optimization index merge May 27, 2023 pm 05:49 PM

A deadlock occurred in the background production environment. By checking the deadlock log, we saw that the deadlock was caused by two identical update statements (only the values ​​in the where condition were different), as follows: UPDATEtest_tableSET`status`=1WHERE`trans_id`=' xxx1'AND`status`=0;UPDATEtest_tableSET`status`=1WHERE`trans_id`='xxx2'AND`status`=0; It was confusing at first, but after a lot of querying and learning, the deadlock was analyzed

PHP source code running problem: index error solution PHP source code running problem: index error solution Mar 09, 2024 pm 09:24 PM

PHP source code running problem: Index error resolution requires specific code examples. PHP is a widely used server-side scripting language that is often used to develop dynamic websites and web applications. However, sometimes you will encounter various problems when running PHP source code, among which "index error" is a common situation. This article will introduce some common causes and solutions of index errors, and provide specific code examples to help readers better deal with such problems. Problem Description: When running a PHP program

How to remove index.php from https How to remove index.php from https Jun 16, 2023 am 11:41 AM

How to remove index.php from https: 1. Modify the server settings, find the .htaccess file on the server and open it, enter "RewriteEngine On...</IfModule>" and other contents in the file, and then save the file; 2 . Use the URL settings of the CMS system, select "Permalink" in the settings, select "Post Name" in the general settings, and then click "Save Changes"; 3. Use a plug-in to help you remove index.php.

See all articles