search
HomeBackend DevelopmentPHP Tutorial求教,关于php函数以及初级的问题

我刚涉及到php , 所以在这里面就是一菜鸟,所以来请教一下,现在还在看关于PHP的书籍,
遇到以下代码 ,有点疑问

<td width="891" align="left" valign="middle" class="table_title">本项目最近10条投资记录</td>                </tr>              </table></td>          </tr>          <tr>            <td><table width="950" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #CCC; border-top:0;">                <tr>                  <td align="center" valign="top" style=" padding-bottom:5px;"><table  class="tdBordert" border=0 cellSpacing=0 width="100%">                      <THEAD>                        <tr style="background-color:#E4E4E4">                          <td height="25" align="left" valign="middle"> 认购人                            </th>                          <td align="left" valign="middle">认购份数                            </th>                          <td align="left" valign="middle">认购金额                            </th>                          <td align="left" valign="middle">当前利率                            </th>                          <td align="left" valign="middle">认购期限                            </th>                          <td align="left" valign="middle">认购方式                            </th>                          <td align="left" valign="middle">状态                            </th>                        </tr>                      </THEAD>                      <volist name="investinfo" id="vi">                        <tr>                          <td height="25" align="left" valign="middle"> {$vi.user_name|hidecard=###,4}</td>                          <td align="left" valign="middle">{$vi.transfer_num}份</td>                          <td align="left" valign="middle">{$vi.investor_capital|Fmoney=###}元</td>                          <td align="left" valign="middle">{$vo.borrow_interest_rate}%/年</td>                          <td align="left" valign="middle">{$vi.transfer_month}个月</td>                          <td align="left" valign="middle"><if condition="$vi.is_auto eq 1">自动                              <else/>                              手动</if></td>                          <td align="left" valign="middle"><img  src="/static/imghwm/default1.png"  data-src="__ROOT__/Style/H/images/zhangtai.png"  class="lazy"   / alt="求教,关于php函数以及初级的问题" ></td>                        </tr>                      </volist>                    </table></td>                </tr>              </table></td>

代码中,   应该是包含了读取数据库的内容的,不知理解是否有误,但是一般都会放到哪里,我在此文件页面中没有找到,
{$vi.investor_capital|Fmoney=###} 这句话中的 前面$vi.investor_capital是读取的字段?后面Fmoney=###是函数?不知道这样理解是否有误,还有就是 ###  是什么意思?


回复讨论(解决方案)

你这是模板,不是 php 代码

这是个页面模板 你这用的是哪种页面模板?
 里面的数据是从php后台传过来的

你这是模板,不是 php 代码 {$vi.investor_capital|Fmoney=###} 这句话中的 前面$vi.investor_capital是读取的字段?后面Fmoney=###是函数?不知道这样理解是否有误,还有就是 ###  是什么意思?

请认真阅读开发说明

已经跟你说了:这不是 php 语法

Statement
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
How to implement hot update of function in PHP?How to implement hot update of function in PHP?May 15, 2025 pm 08:33 PM

There are three ways to implement hot updates for functions in PHP: 1. Rewrite the function and use runkit to dynamically rewrite the function; 2. Use OPcache to realize hot updates by restarting OPcache; 3. Use external tools such as deployer or ansible to automatically deploy and update code.

How to replace elements while iterating through PHP arrays?How to replace elements while iterating through PHP arrays?May 15, 2025 pm 08:30 PM

In PHP, you can use the following methods to traverse and replace array elements: 1. Use a foreach loop and reference (&$value) to modify the elements, but be aware that references may cause side effects. 2. Use a for loop to directly access indexes and values ​​to avoid reference problems. 3. Use the array_map function to make concise modifications, but the key name will be reset. 4. Use the array_walk function to modify the value and retain the key name. Performance, side effects and key name retention requirements should be taken into account when selecting a method.

How to verify ISBN strings in PHP?How to verify ISBN strings in PHP?May 15, 2025 pm 08:27 PM

Verifying ISBN strings in PHP can be implemented through a function that can handle two formats: ISBN-10 and ISBN-13. 1. Remove all non-numeric characters. 2. For ISBN-10, weighted sum calculation is used, and it is valid if the result can be divided by 11. 3. For ISBN-13, different weighting sum calculations are used, and it is valid if the result can be divided by 10. This function returns a Boolean value indicating whether the ISBN is valid.

How to implement automatic loading of classes in PHP?How to implement automatic loading of classes in PHP?May 15, 2025 pm 08:24 PM

In PHP, automatically loading classes are implemented through the __autoload or spl_autoload_register function. 1. The __autoload function has been abandoned, 2. The spl_autoload_register function is more flexible, supports multiple automatic loading functions, and can handle namespace and performance optimization.

How to modify array elements in PHP?How to modify array elements in PHP?May 15, 2025 pm 08:21 PM

Methods to modify array elements in PHP include direct assignment and batch modification using functions. 1. For indexed arrays, such as $colors=['red','green','blue'], the second element can be modified by $colors[1]='yellow'. 2. For associative arrays, such as $person=['name'=>'John','age'=>30], the value of age can be modified by $person['age']=31. 3. Use array_map or array_walk functions to modify array elements in batches, such as $numbers=array_map(fun

How to implement hook function in PHP?How to implement hook function in PHP?May 15, 2025 pm 08:18 PM

Implementing hook functions in PHP can be implemented through observer mode or event-driven programming. The specific steps are as follows: 1. Create a HookManager class to register and trigger hooks. 2. Use the registerHook method to register the hook and trigger the hook by the triggerHook method when needed. Hook functions can improve the scalability and flexibility of the code, but pay attention to performance overhead and debugging complexity.

PHP Performance Tuning for High Traffic WebsitesPHP Performance Tuning for High Traffic WebsitesMay 14, 2025 am 12:13 AM

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

Dependency Injection in PHP: Code Examples for BeginnersDependency Injection in PHP: Code Examples for BeginnersMay 14, 2025 am 12:08 AM

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

See all articles

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment