万急用thinkphp在html模板里面图片路径如何调用
万急用thinkphp在html模板里面图片路径怎么调用
myweb项目名称放在WEB目录下
thinkphp放在myweb下
入口文件:/index.php
模板放在:/Tpl/default/index/,如index.html
图片目录在:/Tpl/default/public/iamges/目录下,如logo.png
在index.html中用到logo.png图片,我给图片设置绝对路径:.
问题出现了:
我用:http://localhost/myweb/Tpl/default/index/index.html 图片可以正常显示,
但是要在入口文件运行http://localhost/myweb/index.php/index/index/,图片就是不显示,
当然,这两种访问方式,页面内容是可以正常显示的,就是图片显示问题,还有CSS也调用不到了
------解决方案--------------------
在页面这样用
要么你就设置虚拟主机
http://www.myweb.com => http://localhost/myweb
然后在页面这样用

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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: <

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

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.

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

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 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: 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.
