Page 2 of 2
Posted: Mon Nov 11, 2002 8:10 pm
by volka
installing apache/php is that simple that I say no atm

for syntax checking you even do not need webserver software.
Just download php from
php.net and invoke
Just try it, it's really simple.....
Posted: Mon Nov 11, 2002 8:15 pm
by hatman
OK I'll give it a try.
What does the -l stand for? And how do i invoke it? in a browser? or can I launch a test window or something?
Posted: Mon Nov 11, 2002 8:18 pm
by volka
you have to invoke it at the command line (dos box for windows

)
-l ...hmmm, maybe
lint - don't really know. It will just perform a syntax check without executing the script
http://www.php.net/manual/en/features.commandline.php
-l Syntax check only (lint)
yo, lint

Posted: Mon Nov 11, 2002 9:30 pm
by hatman
doooohh...
Volka! I got it!
If you look at the code what is OBVIOUSLY wrong?
Code: Select all
<form action="<?php echo $page; ?>.php" method="post">
what is the page being updated doing there?
nothing executes the script!
In short:
The file where the executable code resides is named update.php right
Code: Select all
<form action="update.php" method="post">
Just a little harmless mistake hah?
Thanks so much Volka for staying with me!
Posted: Mon Nov 11, 2002 9:56 pm
by hatman
Here's the full script, just in case anybody is interested:
Code: Select all
<?php
include("class.ewp.php");
if($_GETї'page'] == '')
$page = $_POSTї'page'];
else
$page = $_GETї'page'];
$myEWP = new EWP;
if(@$_POSTї"save"] == "true")
{
$fileContent = $myEWP->GetValue(false);
$fp = fopen("$page.php", "w");
fputs($fp, $fileContent);
fclose($fp);
echo "Content saved!<br><br><a href='$page.php'>Continue</a>";
}
else
{
$fp = fopen("$page.php", "rb");
while(!feof($fp))
{
$data .= fgets($fp, 1024);
}
$myEWP->SetValue($data);
?>
<form action="update.php" method="post">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save" value="true">
<?php $myEWP->ShowControl(400, 300, "imgs"); ?>
<br><input type="submit" value="Save">
</form>
<?php
}
?>