Вопрос по php – Вызов неопределенной функции из другого php-файла.

4

Error: User Rate Limit Exceeded

index.php

require_once($WebsiteRoot . "/include/testfile.php");
TestFunction();

/include/testfile.php

function TestFunction()
{
    echo "It Works";
}

And it gives me the error:

Fatal error:
Call to undefined function TestFunction() in /path/index.php on line 49

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded HamZa
Error: User Rate Limit Exceeded nullpointr
Error: User Rate Limit Exceeded Jared
echo $WebsiteRoot . "/include/testfile.php";Error: User Rate Limit Exceeded Sampson
Error: User Rate Limit Exceeded JJJ

Ваш Ответ

3   ответа
4

<?php

<?php

1

Error: User Rate Limit Exceeded

error_reporting(E_ALL | E_WARNING | E_NOTICE);
ini_set('display_errors', TRUE);

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

$websiteRoot = "/var/www/html/websiteName";
OR
$websiteRoot = "C://xampp/htdocs/websiteName";

Error: User Rate Limit Exceeded

$websiteRoot = "http://www.somesite.com";
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceededindex.phpError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

$WebsiteRoot=$_SERVER['DOCUMENT_ROOT'];

Error: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededwebsite.comError: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы