Jump to content

permissions


ohdang888

Recommended Posts

ok...i'm REALLLLYYYYY  confused about permissions. i use apche with xammp. i've been having toruble with some forms lately, partly its because of permissions.

i've tried to google it but nothing understandable comes up...

 

 

its in .htaccess, right? but do i hve to copy and paste that document into every folder of the site, or do i only i have one .htaccess...???

 

what part of the code do i change to allow people to write on files in certain parts of my site???

 

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/
Share on other sites

for example. i'm creating a gaming site (more for learning purposes)....

 

with tons of games eing added, i don't want to have to do it manually...

 

i want to create a form that will have field where i can enter all the unique info for that webpage.

 

heres what i have so far

<?php
// Everything for owner, read and execute for others
chmod("../create", 0700);
?>


<?php
  $name = $_POST["name"];
  $folder= $_POST["folder"];
  mkdir('c:/xammp/htdocs/create/new/$folder', 0700);
  $newindex = "index.php";
  $fh1 = fopen($newindex, 'w') or die("can't create file");
  fwrite($fh1,$name);
  fclose($fh1);
?>


<html>
<form method="post">
Name of game:<input type="text" size="15" maxlength="30" name="name"/> 
<br/> 
folder name:<input type="text" size="15" maxlength="30" name="folder"/> 
<br/>
<input type="submit" name="submit" value="Submit"/>

 

that code in lcoated in "mysite/create". but its not working.

 

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423766
Share on other sites

Use a database to store your content, creating folders and index.php pages for each page of your website is rediculous, you may as well go back to using html.

 

PHP and MySql can help you create dynamic websites without the need to make new files. Your really missing the entire point here.

Link to comment
https://forums.phpfreaks.com/topic/83286-permissions/#findComment-423829
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.