Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-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-...
ikebastuz's user avatar
  • 389
-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"...
Alex's user avatar
  • 3
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 $...
Vassilis's user avatar
  • 2,898
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 ...
Roman's user avatar
  • 129k