![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Hobbyist Programmer
|
aargh! include thing with function call
i have a file called, let's say, stuff.php. i put this code in it:
<?PHP
function doSomething() {
# do something productive here
}
?>and then in some other file i have this: (well call it otherstuff.php) <?PHP
include 'stuff.php'; #yes it's in the right dir, etc.
function doSomethingElse() {
doSomething();
}
?>but when i open the page it says this: Quote:
__________________
Children in the dark cause accidents, and accidents in the dark cause children. http://www.ronincoders.org |
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
how do i set that include-path?
__________________
Children in the dark cause accidents, and accidents in the dark cause children. http://www.ronincoders.org |
|
|
|
|
|
#4 |
|
PFO Founder
![]() ![]() |
i believe it would be in your php.ini file but personally i dont have that line in my php.ini file and your code works just fine on my server. so my recommendation is to go and comment that line out of your php.ini file and it should then look for the files right in your current directory
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
hmm, now it seems to run correctly just throws a bunch of warnings. is it possible to disable verbose warnings in php?
__________________
Children in the dark cause accidents, and accidents in the dark cause children. http://www.ronincoders.org |
|
|
|
|
|
#6 |
|
PFO Founder
![]() ![]() |
it would be in the php.ini file
![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
|
there's no other way (commercial server, they won't let me touch that stuff)
__________________
Children in the dark cause accidents, and accidents in the dark cause children. http://www.ronincoders.org |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Best thing is to try to fix what's causing the warnings.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
PFO Founder
![]() ![]() |
yeah what warnings are you getting.
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#10 |
|
Programmer
Join Date: Jan 2005
Posts: 44
Rep Power: 0
![]() |
To remove error reporting without accessing php.ini can be done using the
error_reporting(); function (http://us2.php.net/manual/en/functio...-reporting.php) am not sure if you require any access levels as i never use it. if you simply want to supress a warning add an @ at the beginning of the line the error is reported at. but like DaWei said it would be better for your script if you were to fix these warnings. hope it helps magic e |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|