[eluser]riwakawd[/eluser]
I am just not sure on some thing for my form validation. I am trying to use all codeigniter methods rather than create my own I would like to make sure these files are write able
But would like to be able to get codeigniter form validation to pick it up not. Sure on set rules should have and if files writable
If any body can give me some examples would be great
Need to make sure these files are writable.
Code:
$data['config'] = FCPATH . APPPATH . 'config/config.php';
$data['cache'] = FCPATH . APPPATH . 'cache';
$data['logs'] = FCPATH . APPPATH . 'logs';
$data['download'] = FCPATH . APPPATH . 'modules/download';
$data['image'] = FCPATH . APPPATH . 'modules/image';
$data['image_cache'] = FCPATH . APPPATH . 'modules/image/cache';
$data['image_data'] = FCPATH . APPPATH . 'modules/image/catalog';
This is how its is on my view
Code:
<table class="table">
<thead>
<tr>
<td align="left"><b><?php echo $text_directory; ?></b></td>
<td align="left"><b><?php echo $text_status; ?></b></td>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $cache . '/'; ?></td>
<td><?php if (is_writable($cache)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $logs . '/'; ?></td>
<td><?php if (is_writable($logs)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $download . '/'; ?></td>
<td><?php if (is_writable($download)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $image . '/'; ?></td>
<td><?php if (is_writable($image)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $image_cache . '/'; ?></td>
<td><?php if (is_writable($image_cache)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><?php echo $image_data . '/'; ?></td>
<td><?php if (is_writable($image_data)) { ?>
<span class="text-success"><?php echo $text_writable; ?></span>
<?php } else { ?>
<span class="text-danger"><?php echo $text_unwritable; ?></span>
<?php } ?>
</td>
</tr>
</tbody>
</table>