我试图利用$_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)
请帮助,这是我正在努力的安全漏洞.
让我们假设我正在处理的文本是(由 输出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) 我需要一个不循环的函数来检查数组值是否大于我选择的数字X。如果有则返回 false。
有没有一种有效的方法来做到这一点?也许是一些匿名函数?
这只是一个好奇的问题,我不知道如何通过谷歌搜索.
有些功能是这样的:
function foo()
{
$bar = 'Hello World';
return;
}
Run Code Online (Sandbox Code Playgroud)
什么retun;会回来?这有点荒谬.