redirect、success页面跳转问题
我想在判断结束后使用redirect直接跳转到前一页。
但是redirect需要指定url。。。
但是我想要跳转的url需要好多参数,我不想这么麻烦。。
能不能有什么办法让我像success这样不需要指定url,自己跳回前一页
准确来说,我需要做的功能是一个留言功能,留言成功之后需要页面刷新,来显示我提交的留言,但是我不会ajax。。所以想直接用tp里的页面跳转。。。 新手学习中。。求助
回复讨论(解决方案)
没准确理解需求,提交完留言是返回留言列表页,还是留言内容页,这么会有很多参数呢。。。
1.redirect中也是可以使用路由的,用U方法
2.最好还是在控制器里写个方法来展示列表页或内容页,留言成功直接跳转到对应方法!
没准确理解需求,提交完留言是返回留言列表页,还是留言内容页,这么会有很多参数呢。。。
1.redirect中也是可以使用路由的,用U方法
2.最好还是在控制器里写个方法来展示列表页或内容页,留言成功直接跳转到对应方法!
就是这样。。留言成功之后还是返回到这个需要留言这页,因为这个页面的显示我就已经传了两个参数,如果用方法展示,我还得获取这两个参数,,
汗,你这不就是在本页面操作嘛,意思就是刷新本页面?把本页url地址传到success方法的第二个参数来跳转到本页,在你本操作里参数都已知了,这个url还是好写的吧
汗,你这不就是在本页面操作嘛,意思就是刷新本页面?把本页url地址传到success方法的第二个参数来跳转到本页,在你本操作里参数都已知了,这个url还是好写的吧
不用success 用redirect行么? success 太丑。。然后还有时间间隔。。我想直接跳过来
$this->redirect("Index/detail/id/$id"); 这样是出错的
怎么解决啊 亲
success 是可以设置跳转时间的,你设置为0不就可以直接跳了。
为什么不学学ajax呢。不是很难地。
success 是可以设置跳转时间的,你设置为0不就可以直接跳了。
0也有间隔,我试过,主要是success跳转的时候会出现那个傻傻的笑脸。。狠吐血的感脚
success 是可以设置跳转时间的,你设置为0不就可以直接跳了。
0也有间隔,我试过,主要是success跳转的时候会出现那个傻傻的笑脸。。狠吐血的感脚 那就用ajax吧直接跳。

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

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

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



Want to copy a page in Microsoft Word and keep the formatting intact? This is a smart idea because duplicating pages in Word can be a useful time-saving technique when you want to create multiple copies of a specific document layout or format. This guide will walk you through the step-by-step process of copying pages in Word, whether you are creating a template or copying a specific page in a document. These simple instructions are designed to help you easily recreate your page without having to start from scratch. Why copy pages in Microsoft Word? There are several reasons why copying pages in Word is very beneficial: When you have a document with a specific layout or format that you want to copy. Unlike recreating the entire page from scratch

How to implement page jump after PHP form submission [Introduction] In web development, form submission is a common functional requirement. After the user fills out the form and clicks the submit button, the form data usually needs to be sent to the server for processing, and the user is redirected to another page after processing. This article will introduce how to use PHP to implement page jump after form submission. [Step 1: HTML Form] First, we need to write a page containing a form in an HTML page so that users can fill in the data that needs to be submitted.

Standby is a new feature in the iOS 17 update that provides a new and enhanced way to access information when your phone is idle quickly. With StandBy, you can conveniently check the time, view upcoming events, browse your calendar, get weather updates for your location, and more. Once activated, the iPhone will intuitively enter standby mode when set to landscape while charging. This feature is perfect for wireless charging points like your bedside table, or when you're away from your iPhone charging during daily tasks. It allows you to swipe through various widgets displayed in standby to access different sets of information from various applications. However, you may want to modify these widgets or even delete some based on your preferences and the information you need frequently. So let's dive into

PHP login jump value transfer method: 1. POST value transfer, use the HTML "form" form jump method to post value transfer; 2. GET transfer value, use the <a> tag to jump to xxx.php , obtain the passed value through "$_GET['id']"; 3. SESSION passes the value. Once saved in SESSION, other pages can be obtained through SESSION.

Page refresh is very common in our daily network use. When we visit a web page, we sometimes encounter some problems, such as the web page not loading or displaying abnormally, etc. At this time, we usually choose to refresh the page to solve the problem, so how to refresh the page quickly? Let’s discuss the shortcut keys for page refresh. The page refresh shortcut key is a method to quickly refresh the current web page through keyboard operations. In different operating systems and browsers, the shortcut keys for page refresh may be different. Below we use the common W

The success method in php is used to display a success message. Its usage syntax is "Success('...','Http://www.xxx.com/Admin/User/Index');", when we do not write Url, the system will determine whether there is a previous page. If there is a system, it will jump to the previous page, otherwise it will not jump.

When writing a website or application, you often encounter the need to jump to a specific page. In PHP, we can achieve page jump through several methods. Below I will demonstrate three common jump methods for you, including using the header() function, using JavaScript code, and using meta tags. Using the header() function The header() function is a function used in PHP to send original HTTP header information. This function can be used in combination when implementing page jumps. Below is a

In iOS, Apple allows you to disable individual home screen pages on your iPhone. It's also possible to rearrange the order of home screen pages and delete pages directly instead of just disabling them. Here's how it works. How to Rearrange Home Screen Pages Touch and hold Space on the Home screen to enter jitter mode. Tap the row of dots that represent Home screen pages. In the Home screen grid that appears, touch and drag a page to rearrange it relative to other pages. Others move in response to your dragging. When you're happy with your new arrangement, tap "Done" in the upper right corner of the screen, then tap "Done" again to exit dither mode. How to Disable or Remove Home Screen Pages Touch and hold Space on the Home screen to enter dither mode. Tap to represent home screen
