CHMOD ???

crazy_dog

Registered
Какво значи това :|
На един скрипт пише, че за да го настроя трябва да направя това:
CHMOD emails.txt and links.txt 777
Някои ако може да обясни!
 

Admin

Registered
С FTP клиент се сменят или през Cpanel (ако имаш).

Ако сървъра ти е на домашния комп няма да имаш проблеми с правата.
 

Soul_Stealler

Registered
скрипта ти не работи под localhost на Windows и ти изписва че трябва правата на тези 2 файла да са на 777. Така ли ? :roll:
 

crazy_dog

Registered
Ето какво представлява и самият скрипт:
index.php
<?php
include "header.php";
?>
<?php
$data = file('links.txt');
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|", $element);
echo $pieces[2] . $pieces[1] . "" . $pieces[0] . "";
}
?>
<?php
include "footer.php";
?>

header.php
<?php
require "variables.php";
?>
<html>
<head>
<title><?php echo $title ?> </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body bgcolor="#006699" text="#FFFFFF" link="#FFFFFF" vlink="#FFFF00" alink="#FF0000"><font color="#FFFFFF" size="1" face="verdana">
<br>
<center><font size="4">
<?php echo $text1 ?>
<br>
<?php echo $text2 ?>
<br>
<a href="<?php echo $url1 ?>" target=_blank">
<?php
echo $urltext1 ?>
</a><br></font>
</center><br>

<div align="center"><a href="submit.php"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Click
Here To Submit Your Site</font></a></div><br>

footer.php
<center>
<br>
<font size="4">
<?php
echo $text3 ?>
<br>
<?php echo $text4 ?><br>
<a href="<?php echo $url2 ?>" target=_blank">
<?php
echo $urltext2 ?>
</a></font> <br>
</center><br>
<div align="center"><a href="submit.php"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Click
Here To Submit Your Site</font></a></div><br>
</html>

linklist.php
<?php
require "variables.php";
if ($wsname == "localhost") {
echo "You must fill out a site name.";
exit;
}
else
if ($wsurl == "localhost/new/") {
echo "You must fill out a site URL.";
exit;
}
else
if ($description == "all") {
echo "You must put a description.";
exit;
}
else
if ($email == "admin@mail.com") {
echo "You must enter your email.";
exit;
}
else
$textfile = ("links.txt");
$textfile2 = ("emails.txt");
$fp = fopen($textfile, "a+");
fputs ($fp, "<center><table><tr><td bgcolor=666666 width=500 height=20><font size=2><img src=$imagedir/browser.gif><strong><a href=http://$wsurl target=_blank><font size=4>$wsname</font></a></strong></td></tr><tr><td bgcolor=cccccc width=400><font size=2><font color=000000>$description</font></td></tr></table></center><br><br>\n");
fclose($fp);
$fp = fopen($textfile2, "a+");
fputs ($fp, "$email\n");
fclose($fp);
echo "<html> <title>$title</title><body bgcolor=006699 text=FFFFFF link=FFFFFF vlink=FFFF00 alink=FF0000><font color=FFFFFF size=3 face=verdana><br><center><br> $text1<br>$text2 <br><a href=\"$url1 \" target=_blank\"> $urltext1</a><br><br>Your site has been successfully added. <a href=$viewpage>Click here</a> to view the Link List page.</center></html>";
?>

submit.php
<?php
require "variables.php";
?>
<html>
<head>
<title><?php echo $title ?> </title>
</head>
<body bgcolor="#006699" text="#FFFFFF" link="#FFFFFF" vlink="#FFFF00" alink="#FF0000">
<center><font size="4">
<?php
echo $text1 ?>
<br>
<?php echo $text2 ?><br>
<a href="<?php echo $url1 ?>" target=_blank">
<?php
echo $urltext1 ?>
</a><br>
<font color="#000000">Submit you site for an Instant Free Listing</font></font>
</center> <FORM METHOD="POST" ACTION="linklist.php">
<table width="500" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Website
Name:</font></strong> </div></td>
<td> <div align="left">
<INPUT TYPE="text" NAME="wsname" SIZE="30">
</div></td>
</tr>
<tr>
<td width="105"><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Website
URL:</font></strong> </div></td>
<td width="195"> <div align="left">no http:// just www. 
<INPUT TYPE="text" NAME="wsurl" SIZE="24">
</div></td>
</tr>
<tr>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Description:</font></strong></div></td>
<td><textarea name="description" cols="26"></textarea></td>
</tr>
<tr>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email:</font></strong></div></td>
<td><input type="text" NAME="email"></td>
</tr>
<tr>
<td> </td>
<td><div align="center">By Submitting your link you agree to recieve mailings
from us.<br>
<INPUT TYPE="submit" value="Submit!">
</div></div>
</td>
</tr>
</table>
</form>

<center><font size="4">
<?php
echo $text1 ?>
<br>
<?php echo $text2 ?><br>
<a href="<?php echo $url2 ?>" target=_blank">
<?php
echo $urltext2 ?>
</a></font>
</center>
</html>

variables.php
<?php

// This is the page where you will put your free for fall links on. This is a URL!
$viewpage = "index.php";

// The directory to where you will upload your images. DO NOT END WITH TRAILING SLASH!
$imagedir = "images";

// Website Title
$title = "Title Of Link Page";

// Text 1 for top of pages
$text1 = "Your Text Here";

// Text 2 for top of pages
$text2 = "Second Line of Text";

// Link for Top Of Page
$url1 = "http://www.yahoo.com";

//URL 1 Text
$urltext1 = "Text Of URL";

// Text 1 for bottom of pages
$text3 = "Your Text Here";

// Text 2 for bottom of pages
$text4 = "Second Line of Text";

// Link for Top Of Page
$url2 = "http://www.google.com";

//URL 1 Text
$urltext2 = "Text Of URL";


?>

И разбира се и двата .txt файла (emails и links). Име и една папка "images" от която взема една картинка. Самият скрипт служи да се записват имена и адреса на сайтове и след това да се извежда списък на всички записани сайтове. Не изпозлва MySQL, а пише в двата текстови файла. Проблема е, че като запиша някаква страница неми извежда резултат и немога да разбера защо! :(
 

Ins1de

Registered
И аз имам някакъв проблем с това.Имам домашен сървър(XAMPP).Свързвам се с FileZilla клиент към FileZilla сървъра,но немога да променя правата.Работя с Windows. :(
 

Горе