Help me about two things....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Help me about two things....

Post by Ankan »

Hi,
I am facing two sloppy problems : file("www.google.com").....returns an array. If that URL does not exist then it shows an warning which I dont want to show to the user. How can I solve this without try...catch. Since I am doing this in PHP 4 that does not support try..catch.

Another problem is that how can I configure PHP 5 with apache manually.
Please let me know ....
Regards
Ankan.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

file() returns an array. file_get_contents() returns a string. There are several way to check, see the manual:

http://www.php.net/manual/en/ref.filesystem.php
(#10850)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Descriptive subjects

Post by feyd »

Please update the thread's title to be more descriptive.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Post Reply