Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,680 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,213 people online right now. Registration is fast and FREE... Join Now!




Pear in wamp server

 
Reply to this topicStart new topic

Pear in wamp server

avin.w
post 31 May, 2008 - 08:13 AM
Post #1


New D.I.C Head

*
Joined: 31 May, 2008
Posts: 1

why this is not workin on wamp server?
CODE

<?php
include "numbers/words.php";
$nw= new numbers_words();
echo $nw->toWords(19000000);
?>

errors
Warning: include(numbers/words.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\php solutions\Untitled-2.php on line 2

Warning: include() [function.include]: Failed opening 'numbers/words.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\php solutions\Untitled-2.php on line 2

Fatal error: Class 'numbers_words' not found in C:\wamp\www\php solutions\Untitled-2.php on line 3
User is offlineProfile CardPM

Go to the top of the page

max302
post 31 May, 2008 - 08:34 AM
Post #2


Proud supporter of the lulz

Group Icon
Joined: 5 Mar, 2006
Posts: 1,281



Dream Kudos: 200
My Contributions


It's looking for your include in the pear directory since you are specifying the include without the parenthesis. Either place your file there or try include("./numbers/words.php");

The dot represents the currently directory, where the script is ran, so this way of including should be the safest.
User is offlineProfile CardPM

Go to the top of the page

akozlik
post 31 May, 2008 - 12:43 PM
Post #3


D.I.C Addict

Group Icon
Joined: 25 Feb, 2008
Posts: 596



Thanked 22 times

Dream Kudos: 750
My Contributions


Took the words right out of my mouth. You need to make sure you're using the first forward slash to make sure you're making it to your directory. It should work from there. The error that you're getting isn't a PEAR error, it's just a standard file not found error. Check your paths and make sure the file exists in the numbers directory.
User is offlineProfile CardPM

Go to the top of the page

no2pencil
post 31 May, 2008 - 12:43 PM
Post #4


My fridge be runnin OH NOEZ!

Group Icon
Joined: 10 May, 2007
Posts: 6,354



Thanked 58 times

Dream Kudos: 2375

Expert In: Goofing Off

My Contributions


...The error message is pretty forward.
QUOTE

Warning: include(numbers/words.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\php solutions\Untitled-2.php on line 2

the include command, failed to open the file argument it was fed. The error being, no such file, & then it point to the actual line that the error occurred on. To fix this error, find the file & correct the path.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:44AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month