小编Dug*_*ugi的帖子

如果用户不是来自这里,那么不要处理 - 如何?

我试图利用$_SERVER它,但它对我不起作用.

我需要的是:

要访问我网站上的页面,用户必须从Paypal返回.如果他没有从Paypal重定向到我的网站,那么不要执行该文件,而是给用户一个错误.

我怎样才能做到这一点?

我尝试了以下方法:

 $url = 'paypal';
 if(strstr($_SERVER['HTTP_REFERER'], $url)) {
     // my code
 } else {
    // my error
 }
Run Code Online (Sandbox Code Playgroud)

这对我不起作用,我怎样才能完成这项工作,来自paypal的示例链接(它很长):

https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=39QzTUoR0GugSwdZjeJ5zf4EkFIa2-rlRsdrqxfx4O3ibIMuzY3Eab7y6Dq&dispatch=5885d80a13c0db1f8e263663d3faee8dc60d77e6184470d515cedf52660ea0cd
Run Code Online (Sandbox Code Playgroud)

请帮助,这是我正在努力的安全漏洞.

php security paypal

0
推荐指数
1
解决办法
207
查看次数

使用 Bash Perl 从命令输出中获取子字符串

让我们假设我正在处理的文本是(由 输出pecl install xdebug):

  |   - A list of all settings:  https://xdebug.org/docs-settings.php    |
  |   - A list of all functions: https://xdebug.org/docs-functions.php   |
  |   - Profiling instructions:  https://xdebug.org/docs-profiling2.php  |
  |   - Remote debugging:        https://xdebug.org/docs-debugger.php    |
  |                                                                      |
  |                                                                      |
  |   NOTE: Please disregard the message                                 |
  |       You should add "extension=xdebug.so" to php.ini                |
  |   that is emitted by the PECL installer. This does not work for      |
  |   Xdebug.                                                            |
  |                                                                      |
  +----------------------------------------------------------------------+


running: find "/tmp/pear/temp/pear-build-defaultuserNxuIJy/install-xdebug-2.9.2" | xargs …
Run Code Online (Sandbox Code Playgroud)

linux bash perl substring

0
推荐指数
1
解决办法
111
查看次数

检查数组中是否有比X更大的数字

我需要一个不循环的函数来检查数组值是否大于我选择的数字X。如果有则返回 false。

有没有一种有效的方法来做到这一点?也许是一些匿名函数?

php arrays comparison

-1
推荐指数
1
解决办法
3348
查看次数

函数返回 - PHP

这只是一个好奇的问题,我不知道如何通过谷歌搜索.

有些功能是这样的:

function foo()
{
    $bar = 'Hello World';

    return;
}
Run Code Online (Sandbox Code Playgroud)

什么retun;会回来?这有点荒谬.

php return function

-2
推荐指数
1
解决办法
97
查看次数

标签 统计

php ×3

arrays ×1

bash ×1

comparison ×1

function ×1

linux ×1

paypal ×1

perl ×1

return ×1

security ×1

substring ×1