| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Aug 2003
Lives in Belgium
18 posts
Gave thanks: 0
Thanked 0 times
|
are functions like fopen() allowed on surpasshosting? :ask:
my site uses them, but it's not really needed. When I use it I get this error: Warning: fopen(temp.php): failed to open stream: Permission denied in /home/cosmicc/public_html/index.php on line 47 |
|
|
|
|
#3 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Aug 2003
Lives in Belgium
18 posts
Gave thanks: 0
Thanked 0 times
|
I have no idea on how to do that :dongget:
this is my code: Code:
$fp = fopen("temp.php","w+");
fputs($fp, $code);
fclose($fp);
include("temp.php");
unlink("temp.php");
Anyone can help me? thx ![]() edit: this is the whole error thingy: Warning: fopen(temp.php): failed to open stream: Permission denied in /home/cosmicc/public_html/index.php on line 47 Warning: fputs(): supplied argument is not a valid stream resource in /home/cosmicc/public_html/index.php on line 48 Warning: fclose(): supplied argument is not a valid stream resource in /home/cosmicc/public_html/index.php on line 49 Warning: main(temp.php): failed to open stream: No such file or directory in /home/cosmicc/public_html/index.php on line 50 Warning: main(): Failed opening 'temp.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cosmicc/public_html/index.php on line 50 Warning: unlink(temp.php): No such file or directory in /home/cosmicc/public_html/index.php on line 51 |
|
|
|
|
#4 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jul 2003
44 posts
Gave thanks: 0
Thanked 0 times
|
You might need to set the permissions of the directory your trying to work on which i think is public_html/. Try making it writeable? You can change the permissions from the cpanel file manager.
|
|
|