Salut, am facut un Data form care sa trimita date in text file cu codul asta :
if (isset($_POST['nickname']) && isset($_POST['description']) && isset($_POST['match']) && isset($_POST['oras']) )
{
$nickname = $_POST['nickname'];
$match = $_POST['match'];
$description = $_POST['description'];
$oras = $_POST['oras'];
if (!empty($nickname) && !empty($description) && !empty($match) && !empty($oras))
{
$handle = fopen("xx/Info.txt","a");
fwrite($handle, "\n".$match." ".$nickname." ".$oras." ".$description."\n");
fclose($handle);
header('Location: /xx/replaysend.php');
} else
echo 'There was an error. Please try later. If the error persist contact us.';
}
?>
Si cand dau click pe submit ma trimite pe pagina replaysend ca si cum as fi trimis cu succes dar nu-mi scrie nimic in Info.txt si imi apare asta in error_log :
[30-Jan-2013 11:41:33 Europe/Bucharest] PHP Warning: fopen() [<a href='function.fopen'>function.fopen</a>]: Unable to access replays/Info.txt in /home/rxx/public_html/rxxx/replay.php on line 117
[30-Jan-2013 11:41:33 Europe/Bucharest] PHP Warning: fopen(replays/Info.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in /home/rxx/public_html/rxxx/replay.php on line 117
[30-Jan-2013 11:41:33 Europe/Bucharest] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/rxx/public_html/rxxx/replay.php on line 118
[30-Jan-2013 11:41:33 Europe/Bucharest] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/rxx/public_html/rxxx/replay.php on line 119
Ajutatima varog aici sau add pe mess : rodota2com ! mersi
Rezolvare erori php
Moderators: Moderatori ajutatori, Moderatori
- KudosFAN
- Membru, skill +2
- Posts: 560
- Joined: 07 Feb 2012, 15:20
- Detinator Steam: Da
- CS Status: Nu mai joc !
- Detinator server CS: Nu.
- SteamID: wnnkz
- Location: Oradea
- Has thanked: 18 times
- Been thanked: 30 times
- Contact:
pai mi-e foarte greu pentru ca asta e doar o parte din script, restul design-ului l-am facut fain si mi-a luat ceva timp. Nu ai idee cum pot sa-l repar ?
- VANAHEIM
- Membru, skill +3
- Posts: 1128
- Joined: 28 Jan 2013, 10:26
- Detinator Steam: Da
- Reputatie: Restrictie Moderator
Fost Membru Club eXtreamCS (2 luni)
Utilizator neserios (tepar) - Has thanked: 6 times
- Been thanked: 59 times
- Contact:
Nu,dar sigur ai greşit tu pe acolo ceva, refă-l şi dacă e tot aşa atunci scriptul e problema :-?KudosFAN wrote:pai mi-e foarte greu pentru ca asta e doar o parte din script, restul design-ului l-am facut fain si mi-a luat ceva timp. Nu ai idee cum pot sa-l repar ?
- Mafios_X
- Fost administrator
- Posts: 6851
- Joined: 10 Apr 2009, 01:28
- Detinator Steam: Da
- SteamID: mafiosx
- Reputatie: Fost Administrator
- Location: Italia
- Has thanked: 341 times
- Been thanked: 419 times
- Contact:
De unde sa stiu eu care este linia X daca tu ai postat o parte din el si nu in totalitate ?
Info.txt , ai pus pe acest fisier permisiunile 777 ?
Info.txt , ai pus pe acest fisier permisiunile 777 ?
-------------------------------#STEAM PROFILE--------------------------------------
STEAM: mafiosx
www.gamescan.ro - Un fel de GameTracker ROMANESC :D
STEAM: mafiosx
www.gamescan.ro - Un fel de GameTracker ROMANESC :D
- Marius
- Fost moderator
- Posts: 8294
- Joined: 11 Nov 2007, 12:19
- Detinator Steam: Da
- CS Status: being awesome since 1992
- SteamID: kNNwOw
- Reputatie: eXtream Mod
Fost administrator
Fost dezvoltator al listei de seriozitate eXtreamCS
Fost Membru Club eXtreamCS - Location: Timisoara
- Has thanked: 577 times
- Been thanked: 680 times
Pe folder ai dat permisiuni sau doar pe fisier?
------> un mindset sanatos pentru eXtream <------
PS: NU sunt intermediar
PS: NU sunt intermediar
- MyLo
- Membru eXtream
- Posts: 2373
- Joined: 13 Aug 2011, 03:46
- Detinator Steam: Nu
- CS Status: Destinul lucreaza prin amanunte.
- Reputatie: Fost moderator
- Location: Arad
- Has thanked: 117 times
- Been thanked: 120 times
OmG :| Uite aici ti-am refacut eu codul din nou , nu are nici o legatura permisiuniile !
http://pastebin.com/iHZUnGsM Succes ! :)
http://pastebin.com/iHZUnGsM Succes ! :)