Jump to content
Forum Roportal
Sign in to follow this  

Intrebare pentru programatorii PHP avansati...

Rate this topic

Recommended Posts

Cum fac sa nu imi mai apara aceste erori :crazy: si sa ruleze scriptul fine:


Warning: fopen(cats/1/123245455012.txt) [function.fopen]: failed to open stream: No such file or directory in /home/vatifcom/public_html/licitatie/main.php on line 77


Warning: fread(): supplied argument is not a valid stream resource in /home/vatifcom/public_html/licitatie/main.php on line 79


Warning: fclose(): supplied argument is not a valid stream resource in /home/vatifcom/public_html/licitatie/main.php on line 80


pe pagina asta: http://www.vatif.com/licitatie/index.php?cat=2


:lol: Eroarea apare de fiecare data cand un utilizator adauga un domeniu in licitatie. Cred ca eroarea imi apare din cauza ca nu reuseste sa creeze fisere automate in directorul lui... desi eu am dat chmod 777 la foldere.


Iata sursa... liniile 70-90:

70 if ($total != '0') {

71 foreach($chunk as $key=>$value) {

72 if(is_array($value))

73 // echo $key.' (directory)<br />';

74 // else

75 echo $value.'<br />';

76 $filename = "cats/1/$value";

77 $fp = fopen ("$filename", "r");

78 $bytes = 20000;

79 $itemfile = fread($fp, $bytes);

80 fclose ($fp);

81 list($username, $itemnumber, $title, $cat, $imgurl, $closingtime, $closetime, $desc, $startbid, $resprice, $numbid, $highbid, $highbidname) = explode("|", $itemfile);

82 echo "<tr><td align=center><a href=index.php?action=view&cat=$cat&item=$itemnumber>$title</a></td><td align=center>";

83 if ($imgurl == '') {

84 echo "Nu";

85 } else {

86 echo "Da";

87 }

88 echo "</td><td align=center>$closetime</td><td align=center>$numbid</td><td align=center>$highbid</td><tr>";

89 }



:yes: Ce pot sa fac sa corectez erorile si scriptul sa ruleze okay? astept raspunsurile voastre pe forum.


... si cum as putea sa fac ca fisierele respective sa le creeze automat... sa nu stau eu sa le creez de fiecare data cand un utilizator adauga o licitatie. ?? please help!! :tease: /b]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this