All Questions
4
questions
-1
votes
2
answers
180
views
pdo variable is undefined in mysql function
I have an index.php which is like:
require_once("../resources/config.php");
require_once(LIBRARY_PATH . "/mysql.php");
...
if(checkIfMailExists($email)) {
$error = true;
$errormsg = "This e-...
-1
votes
1
answer
67
views
Strange PHP Reaction
I'm getting some wierd reactions when running this script.
<?php
error_reporting(E_ALL);
class A {
protected $varOne = array(
"subVar1" => "",
"subVar2"...
0
votes
3
answers
165
views
PHP include file that includes a file strange problem!
I face a strange problem including php files. Let me show you the code:
// constants.php
$MYSQL_HOST_PORT = 'localhost:3306';
// functions.php
include 'constants.php';
function getVar() {
echo $...
2
votes
4
answers
6k
views
How can I see a variable defined in another php-file?
I use the same constant in all my php files. I do not want to assign the value of this variable in all my files. So, I wanted to create one "parameters.php" file and to do the assignment there. Then ...