Welcome Guest, Not a member yet? Register   Sign In
why doesn't this work?
#1

$payload = @file_get_contents('php://input');

I don't understand the @ symbol. When I try running this line the code jumps to this line in Codeinginter.php:
/*
* ------------------------------------------------------
*  Call the requested method
* ------------------------------------------------------
*/


Any idea of what the @ is about?
/*
* ------------------------------------------------------

* ------------------------------------------------------
*/
proof that an old dog can learn new tricks
Reply
#2

The "@" will suppress any php errors your function could raise.
A good decision is based on knowledge and not on numbers. - Plato

Reply
#3

What is the use of the @ symbol in PHP?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(This post was last modified: 08-25-2022, 06:26 AM by richb201.)

I got rid of it. After that line runs,
$payload = file_get_contents('php://input');

The debugger strangely jumps to this section of code in Codeigniter.com and stops on $BM->mark which is strnge since I don's have a breakpoint there. I am thinking that I am having a mapping error between my local PC and the remote server.

I have a query into phpStorm support. 
/*
* ------------------------------------------------------
*  Instantiate the requested controller
* ------------------------------------------------------
*/
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');

$CI = new $class();
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB