Re: Re: PHP Fatal error: Call to undefined function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/03/15 14:42, Maciek Sokolewicz wrote:
On 5-3-2015 13:04, hadi wrote:
Hi,

I created function, but im getting error:

(PHP Fatal error:  Call to undefined function rss1() in
C:\phptest\test9.php
on line 17)


The error explains it perfectly. You're calling a function which has not
been defined yet. So... define your function BEFORE you call it, not
AFTER calling it.

So
<?php
function rss1() { ... }
rss1();

instead of
<?php
rss1();
function rss1() { ... }

- Tul

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com



There is also the problem is that his function is being defined inside the Exception block (as far as I can tell from the parentheses) which looks weird...


--
Peter Ford                            phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd.                              www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent   TN12 0AH   United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux