I'm trying to make a form that edits a php file which contains config settings. I'm using strings that are defined by the user form inputs. This is what my file should look like when the form is process(or something like it)
Code: <?php
$config['site_url'] = "http://localhost/sideeffect";
$config['site_name'] = "asdfasdf";
$config['site_motto'] = "A community of gamers";
$config['img_dir'] = $config['site_url']."/images";
$config['style_dir'] = $config['site_url']."/css";
$config['js_dir'] = $config['site_url']."/javascript";
$config['enable_comments'] = FALSE;
$config['enable_points'] = TRUE;
$config['enable_ratings'] = FALSE;
$config['maintenance_mode'] = TRUE;
?>
This is the bit that produces what should be written to the file:
Code: $data = "<?phpnn
$config['site_name'] = "".$info['site_name']."";n [b]//Line that the error occurs on[/b]
$config['site_motto'] = "".$info["site_motto"]."";n
$config['img_dir'] = "".$info["img_dir"]."";n
$config['style_dir'] = "".$info["style_dir"]."";n
$config['js_dir'] = "".$info["js_dir"]."";n
$config['enable_comments'] = "".$comments."";n
$config['enable_points'] = "".$points."";n
$config['enable_ratings'] = "".$ratings."";n
$config['maintenance_mode'] = "".$maintenance."";nn
?>";
This is the error that I'm getting:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:xampphtdocssideeffectsystemapplicationmodelsadminsettings.php on line 4
Thanks for your help
Including calander to page - will not show other months than current??
im trying to add an existaing calander onto a profile page by using Code: <?php include "diary/cal_show.php";?>which looks like this...But when i hit either arrows to move on
max function question
Hi All
Send current URL in URL with a $_GET variable problem.
Hello community,I have created a function that gets the current variable of a page, example:current page URL: Code: [Select] http://example.com/activate.php?token=123&code=321Now, I want to
Need help PLEASE
ok i have this warning showing upWarning: in_array() [function.in-array]: Wrong datatype for second argument in /home/lalala/public_html/attack.php on line 72the code i use Code: [Select]//same ip
Deleting Partners on the Customer Master.
Does SAP handle removing the Partner from Open Sales Orders when a Partner is deleted in the Customer Master. For us, this is not happening, this there some config that must be turned on for this to
Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the working directory:BITMAP *my_pic; my_pic = load_bitmap("kirby.bmp", NULL); if(!my_pic)
str_replace help
Hey there,I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean up bad html to valid xhtml, I am using:Code: $pee = str_replace('&', '&amp;', $pee);It
fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw enabled for the php group, so that fopen() can acces the Dir to write to it. When I try to write
Linux socket programming
Where can I find a good introduction to socket programming?
How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.However the problem is everytime I get a visitor to the webpage it calls the API which means lots of wasteful