Ryze - Business Networking Buy Ethereum and Bitcoin
Get started with Cryptocurrency investing
Home Invite Friends Networks Friends classifieds
Home

Apply for Membership

About Ryze


The PHP developers network

Top [This Network is not currently active and cannot accept new posts]
<- Previous Next ->

630 hits
Apr 16, 2004 6:25 pm re: Creating a PHP file on the fly
Peter Harkins
// Here's some off-the-cuff code. It won't handle arrays, but you could write a recursive function to do so pretty easy (I've code you can take and tweak at http://push.cx/php/escape.phps).
// the message board code is being dumb, so the [?PHP and such will have to get replaced with proper open and close tags
$fh = fopen("/var/www/blah.php");
fwrite($fh, "[?PHP\n");
foreach($config_array as $key => $value) {
fwrite($fh, "$key = '$value';\n");
}
fwrite($fh, "?]\n");
fclose($fh);

Private Reply to Peter Harkins (new win)





Ryze Admin - Support   |   About Ryze



© Ryze Limited. Ryze is a trademark of Ryze Limited.  Terms of Service, including the Privacy Policy