Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a project with lots global variables.
Examples used in functions
function ChangePassForm( $VARS ) {
global $tpl, $iBtns, $db;
...
$db->query("....");
}
I can pretty easy guess what the question is:
"Why is it not working"?
ANSWER from PHP.net:
Anyway I voted to close the question.
#Piotr please refine the question or it will be closed.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Way 1:
public $foo = 1;
function(){
return $this->foo+1;
}
Way 2:
// with $foo = 1 in other function
function($foo){
return $foo+1;
}
Sorry for a 'dumb' question, someone can tell me what is the better way?
Second way is better and it is more canonical than first one. For more information please read this doc http://php.net/manual/en/functions.arguments.php
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Exist any way to know the source page that is calling the query and store it?
Are you looking for $_SERVER['PHP_SELF'] ?
Check also print_r($_SERVER) if something is more accurate for what you need
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
of course that was a typo and it took me longer time than expected to detect this typo. Because it's not easy sometimes to catch this simplest form of bugs.
Use an IDE that highlights PHP errors. Personally, I like PHPStorm.
if (!method_exists('MyClass', '__construct') {
die('You\'ve mis-named __construct() again.');
}
http://php.net/manual/en/function.method-exists.php
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
is there any way i can get the id inside this code:
header('Location: assigned.php?success?$ticket_id');
I am new to PDO. sorry for the simple question
You are adding ? twice. it should be like..
header('Location: assigned.php?success='.$ticket_id);
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to avoid creating another file just to escape the namespace.
Found the solution. For others interested see below.
namespace { function myFunction() { ... } }