Home Backend Development PHP Tutorial ecshop计划任务有关问题

ecshop计划任务有关问题

Jun 13, 2016 pm 01:37 PM
example fsockopen out quot

ecshop计划任务问题
我自己做了一个自动发送邮件的计划任务插件,我的全站都有计划任务触发代码: ecshop计划任务有关问题 ,我设置的是每天早上09:00执行,分钟里面添加了所有的分钟(0-60),执行后关闭未选,高级选项未选,这个插件一直处于开启状态。
现在的问题是刷新页面触发程序执行到调用外部发信方法时就会中断(我把外部的方法写进来就不中断),我点后台“计划任务”列表中的“执行”就会完全执行完,怎么可以让程序无视发信方法所处的位置一路执行到底呢?
另外:ignore_user_abort(true)和set_time_limit(0)我都使用了。



------解决方案--------------------
既然是“刷新页面触发程序执行到调用外部发信方法时就会中断”。那就写一个专门发短信的url。
然后通过fsockopen,往里放数据。

$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}

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 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks 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)

Digital audio output interface on the motherboard-SPDIF OUT Digital audio output interface on the motherboard-SPDIF OUT Jan 14, 2024 pm 04:42 PM

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

What do out and in interfaces mean? What do out and in interfaces mean? Sep 28, 2021 pm 04:39 PM

The out interface refers to the output interface, and the in interface refers to the input interface. The out interface generally represents the audio source line output interface, which is used to connect loads, such as speakers, headphones, etc.; while the in interface generally represents the audio source line input interface, which is used to connect CD players, mobile phones, MP3 players, computers, etc.

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

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

What should I do if my win10 system crashes and displays out of memory? What should I do if my win10 system crashes and displays out of memory? Feb 09, 2024 pm 03:00 PM

Win10 system crashes and displays outofmemory. Recently, many users have encountered this prompt when using their computers, which requires frequent restarts to repair. So how should we deal with this situation? To address this problem, this issue’s win10 tutorial is here Share the complete operation steps with the majority of users, hoping to help more friends solve their problems. What to do if win10 system crashes and displays outofmemory 1. Right-click this computer on the desktop and select "Properties" in the option list. 2. After entering the new window interface, click the "Advanced System Settings" option in the upper left corner. 3. In the window that opens, switch to the "

How to use grep in Linux system? How to use grep in Linux system? Feb 19, 2024 pm 03:54 PM

In Linux, grep is a very common and important tool. It is a command that every professional operation and maintenance engineer must master, because it can quickly find and filter the contents of files. So how to use grep in Linux system? The following is Let’s take a look at the common usage introduction. 1. Basic usage The grep command is mainly used to search for lines of a specified pattern in files. For example, to find the line containing "example" in the file file.txt, you can use the grep command. grep 'example' file.txt grep will output all lines containing 'example'.​

Detailed explanation of the usage of go out in C language Detailed explanation of the usage of go out in C language Mar 14, 2024 am 08:27 AM

In the C language, "goout" is a commonly used term that refers to the exit of a function and the passing of a return value. In this article, we will explain the usage of "goout" in C language in detail and provide specific code examples. In C language, the return value of a function is passed to the calling function through the return statement. The return statement is used to terminate the execution of the function and return a value to the caller. The return statement can be used anywhere in the function body, but generally we will use it at the end of the function to return the final

PHP web crawler uses fsockopen to implement HTTP requests PHP web crawler uses fsockopen to implement HTTP requests Jun 17, 2023 am 11:02 AM

A web crawler is an automated data collection tool that can automatically capture data on the network by simulating user behavior and store or analyze it. As a widely used web development language, PHP also has a wealth of web crawler development tools and technologies. This article will introduce how to use PHP's fsockopen function to implement HTTP requests to build a simple web crawler system. The fsockopen function is a PHP related to Socket communication

Usage and examples of endfor keyword in PHP Usage and examples of endfor keyword in PHP Jun 28, 2023 pm 09:09 PM

Usage and examples of the endfor keyword in PHP In PHP programming, the for loop is a commonly used control structure, which is used to repeatedly execute a block of code. The number of loops can be controlled by specifying the initial value, loop condition, and increment. In PHP, the endfor keyword is a special syntax used to end a for loop. In a general for loop, we often use braces ({}) to wrap the loop body, and then terminate the loop early by using the break keyword. However, PHP provides

See all articles