Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
fread and fclose errors
Old 05-02-2005, 11:03 AM fread and fclose errors
VToria's Avatar
Extreme Talker

Posts: 151
Name: Viki
Location: West Yorkshire
Trades: 0
Can anyone tell me what these errors mean/what causes them?

Quote:
Warning: fread(): supplied argument is not a valid stream resource in /home/starlet/public_html/plugboard/pboard/plug.php on line 44

Warning: fclose(): supplied argument is not a valid stream resource in /home/starlet/public_html/plugboard/pboard/plug.php on line 45
Heres the bit of code that is causing the errors....

PHP Code:
//check to see if they are already on the plugboard, if not, continue with the script 
$readthepluglog fopen($pluglog"r"); 
$contents fread($readthepluglogfilesize($pluglog)); 
fclose($readthepluglog); 
$pluglogtext htmlspecialchars($contents); 
if(
ereg($url,$pluglogtext)) {
echo 
"<center><body bgcolor=$bgcolor><font face=$font_error size=$font_error_size color=$font_error_color>Error: Please wait until you are no longer on the plugboard. <meta http-equiv='refresh' content='4; URL=index.php'></center></font>";
exit();

Thanks.
__________________

Please login or register to view this content. Registration is FREE
- Reality TV videos, news and opinions.


Please login or register to view this content. Registration is FREE
- Bargains from a dedicated UK bargain hunter.
VToria is offline
Reply With Quote
View Public Profile Visit VToria's homepage!
 
 
Register now for full access!
Old 05-02-2005, 06:46 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
Whats the value of $pluglog
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 05-04-2005, 10:56 AM
VToria's Avatar
Extreme Talker

Posts: 151
Name: Viki
Location: West Yorkshire
Trades: 0
I don't know, sorry someone else wrote that bit of code and i'm a bit of a noob so i don't really know the answer.
__________________

Please login or register to view this content. Registration is FREE
- Reality TV videos, news and opinions.


Please login or register to view this content. Registration is FREE
- Bargains from a dedicated UK bargain hunter.
VToria is offline
Reply With Quote
View Public Profile Visit VToria's homepage!
 
Old 05-04-2005, 03:29 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
$pluglog is null, meaning it has no value at that point. So you are trying to open a file that does not exist.

just for testing create test.txt file and upload it to the same directory as this script.
(Put in the file some wacky words or somthing)

add the following code to your php script.
$pluglog="test.txt";

see if it pulls it for you.
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 05-04-2005, 08:23 PM
VToria's Avatar
Extreme Talker

Posts: 151
Name: Viki
Location: West Yorkshire
Trades: 0
Oh, excellent...thanks...i needed to call plug.db.php but didn't realise i needed the extra step of adding that value in, it works a treat now
__________________

Please login or register to view this content. Registration is FREE
- Reality TV videos, news and opinions.


Please login or register to view this content. Registration is FREE
- Bargains from a dedicated UK bargain hunter.
VToria is offline
Reply With Quote
View Public Profile Visit VToria's homepage!
 
Old 05-04-2005, 08:30 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
Glad to hear its working for you now.
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Reply     « Reply to fread and fclose errors
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.87530 seconds with 12 queries