PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Fatal error: Call to undefined function: file_put_contents() in /home/kinetix/public_html/install/index.php on line 483
I heard that function will not work on PHP 4..wich i have..
tell me how to replace that with something that will work..or if anyone used ostube..how to edit the files manually..Thanks
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hmm...ok so this is my code:
[syntax="php"]// save abs and rel path to /cgi-bin/configs/UberUploads.pm
$dump = file_get_contents($baseDir . "/cgi-bin/configs/UberUploads.pm");
$str = "my \$base_dir = \"".$_POST['pathABS']."\";" . "\n";
$str .= "my \$base_url = \"".$_POST['pathREL']."\";" . "\n";
file_put_contents($baseDir . "/cgi-bin/configs/UberUploads.pm", $str . $dump);
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This forum is generally strict but fair - which translates to the fact that you won't ever get anything just written for you. We're here to help you do your work, not do it for you.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
..will echo the contents of what you are about to write to the file. You may also be interested in using nl2br(), when viewing the contents, to convert the new lines to line breaks, which will make it more readable.
Last edited by John Cartwright on Thu Oct 04, 2007 3:20 pm, edited 1 time in total.