<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[PHP Aggiunge /]]></title><description><![CDATA[<p dir="auto">Salve,<br />
ho creatoo uno script per modificare pagine php direttamente dal cms... il problema è che quando le modifico mi aggiunge una marea di / e mi da questo errore:<br />
<strong>Parse error</strong>:  parse error, expecting <code>T_STRING' or </code>T_VARIABLE' or `T_NUM_STRING' in <strong>C:\xampp\htdocs\nfs\p\etch.php</strong> on line <strong>19</strong></p>
<p dir="auto">Pagina con lo script:</p>
<pre><code class="language-php">&lt;?php
session_start();
require('config.php');
require('title.php');
include('header.php');
?&gt;

&lt;?php
if(isset($_SESSION['login']) and isset($_SESSION['lvl']) and $_SESSION['lvl'] == 1)
{
    $id=$_POST['id'];
    $name=$_POST['title'];
    $content=$_POST['content'];
    $cat=$_POST['cat'];
    mysql_select_db($dbname,$connection);
    $query=mysql_query("SELECT * FROM pages WHERE id='$id'") or die ("Query error: " . mysql_error());
    $fetch=mysql_fetch_array($query);
    $fname=$fetch['title'];
    $uname='p/' . $fname . '.php';
    $write=fopen($uname,'w+') or die("can't open file");
    $wrote=fopen($uname,'w') or die("can't open file");
    fclose($write);
    fopen($uname,'w+') or die("can't open file");
    $con='&lt;?php
session_start();
require("../config.php");
mysql_select_db($dbname,$connection);
$query=mysql_query("SELECT * FROM logo") or die ("Query error: " . mysql_error());
$fetch=mysql_fetch_array($query);
$logo=$fetch["path"];
///DO NOT EDIT ABOVE HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
///PAGE TITLE IS THE LINE BELOW
$title = "' . $name .'";
///PAGE TITLE IS THE LINE ABOVE
///PAGE CONTENT ARE THE LINES BELOW
$conte = "' . $content .'";
///PAGE CONTENT ARE THE LINES ABOVE
///DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
$toptitle = " - ' . $name . '";
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php print $tname . $toptitle; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;&lt;&lt; &lt;a href="../index.php"&gt;Home&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;img src="../&lt;?php print $logo; ?&gt;"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;b&gt; - &lt;?php print $title; ?&gt; -&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;?php print $conte; ?&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;?php
include ("../footer.php");
?&gt;
&lt;/body&gt;
&lt;/html&gt;
';
}
fwrite($wrote, $con);

?&gt;

&lt;?php
include('footer.php');
?&gt;
</code></pre>
<p dir="auto">pagina risultante modifica:</p>
<pre><code class="language-php">&lt;?php
session_start();
require("../config.php");
mysql_select_db($dbname,$connection);
$query=mysql_query("SELECT * FROM logo") or die ("Query error: " . mysql_error());
$fetch=mysql_fetch_array($query);
$logo=$fetch["path"];
///DO NOT EDIT ABOVE HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
///PAGE TITLE IS THE LINE BELOW
$title = "etch";
///PAGE TITLE IS THE LINE ABOVE
///PAGE CONTENT ARE THE LINES BELOW
$conte = "&lt;?php
session_start();
require(\"../config.php\");
mysql_select_db($dbname,$connection);
$query=mysql_query(\"SELECT * FROM logo\") or die (\"Query error: \" . mysql_error());
$fetch=mysql_fetch_array($query);
$logo=$fetch[\"path\"];
///DO NOT EDIT ABOVE HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
/// PAGE TITLE IS THE LINE BELOW
$title = \"etch\";
///PAGE TITLE IS THE LINE ABOVE
///PAGE CONTENT ARE THE LINES BELOW
$conte = \"In here you can post the news
To make a text bold: &lt;b&gt;TEXT IN HERE&lt;/b&gt;
To make a text italics: &lt;i&gt;TEXT IN HERE&lt;/i&gt;
To make a text underlined: &lt;u&gt;TEXT IN HERE&lt;/u&gt;
To create a link: &lt;a href=\\\"URL_HERE\\\"&gt;TEXT IN HERE&lt;/a&gt;
To set a text color: &lt;font color=\\\"color name/code\\\"&gt;TEXT IN HERE&lt;/font&gt;
\";
///PAGE CONTENT ARE THE LINES ABOVE
///DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
$toptitle = \" - etch\";
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php print $tname . $toptitle; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;&lt;&lt; &lt;a href=\"../index.php\"&gt;Home&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;img src=\"../&lt;?php print $logo; ?&gt;\"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;b&gt; - &lt;?php print $title; ?&gt; -&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;?php print $conte; ?&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;?php
include (\"../footer.php\");
?&gt;
&lt;/body&gt;
&lt;/html&gt;
";
///PAGE CONTENT ARE THE LINES ABOVE
///DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
$toptitle = " - etch";
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php print $tname . $toptitle; ?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;&lt;&lt; &lt;a href="../index.php"&gt;Home&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;img src="../&lt;?php print $logo; ?&gt;"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;b&gt; - &lt;?php print $title; ?&gt; -&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;?php print $conte; ?&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;?php
include ("../footer.php");
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/topic/102137/php-aggiunge</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 04:26:27 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/102137.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 May 2009 15:54:44 GMT</pubDate><ttl>60</ttl></channel></rss>