Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-18-2002, 05:19 PM   #1
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
PHP problem!

I wonder why this doesn't work. Anybody have any ideas?

<?
$fp = fopen("source.php", "r");
$out = fread($fp, filesize("output.php"));
?>

<? echo $out; ?>
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 05:22 PM   #2
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
But But But... php is cool!
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 05:22 PM   #3
SetTheWorldonFire
Confirmed User
 
Industry Role:
Join Date: Feb 2002
Location: California
Posts: 7,444
send me $1000 immediatly!
__________________
www.STWOFDesign.com
hit me up on icq 154206276 or Skype: JaimeGizzle
SetTheWorldonFire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 05:40 PM   #4
dodo
Confirmed User
 
Join Date: Jan 2002
Posts: 162
Quote:
Originally posted by Validus
I wonder why this doesn't work. Anybody have any ideas?

<?
$fp = fopen("source.php", "r");
$out = fread($fp, filesize("output.php"));
?>

<? echo $out; ?>
you are opening source.php and using filesize of output.php.

you should use the filesize of source.php. remember to close $fp

__________________
FREE TRAFFIC TRADING on any host. Also try our 200% traffic back program.Click here
We host the scripts for you so you trade on our bandwidth.
dodo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 08:20 PM   #5
Socks
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto
Posts: 8,475
Did that fix your problem?
Socks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 09:09 PM   #6
NitroPhil
Confirmed User
 
Join Date: Jun 2002
Location: Lightspeed Sorority
Posts: 103
Quote:
Originally posted by dodo


you are opening source.php and using filesize of output.php.

you should use the filesize of source.php. remember to close $fp

Yeah, that's exactly what's going on. Having a starting PHP tag would help to. As long as you do filesize() on source.php instead of output.php, it should be cool.
__________________
<a href="http://www.lightspeedcash.com"> Make money at the speed of light!</a><br>
- Wouldn't it be cool to own a retarded monkey?
NitroPhil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 09:18 PM   #7
leverage7
Registered User
 
Join Date: Jun 2002
Posts: 9
Quote:
Originally posted by Validus
I wonder why this doesn't work. Anybody have any ideas?

<?
$fp = fopen("source.php", "r");
$out = fread($fp, filesize("output.php"));
?>

<? echo $out; ?>
In addition to the filesize() being called on a different file, make sure that source.php is in your php include path.

You can get your include_path by calling

ini_get('include_path');

and you can change it by calling

ini_set('include_path', '/path/one:/path/two:/etc');
leverage7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-18-2002, 09:22 PM   #8
foe
Confirmed User
 
Join Date: May 2002
Location: CT
Posts: 5,246
Quote:
Originally posted by dodo


you are opening source.php and using filesize of output.php.

you should use the filesize of source.php. remember to close $fp

exactly, not much to add, closing $fp is recomended but not necessary as it will be closed at end of script.

Also when posting in the future copy and paste php errors if there are any as well
foe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.