martes, 3 de octubre de 2017

rmdir

(PHP 4, PHP 5, PHP 7)
rmdirRemoves directory

Description

bool rmdir ( string $dirname [, resource $context ] )
Attempts to remove the directory named by dirname. The directory must be empty, and the relevant permissions must permit this. A E_WARNING level error will be generated on failure.

Parameters

dirname
Path to the directory.
context
Note: Context support was added with PHP 5.0.0. For a description of contexts, refer to Streams.

Return Values

Returns TRUE on success or FALSE on failure. 

Unlink


I want to use absolute path to myFolder in above by using server document root, like below
$_SERVER["DOCUMENT_ROOT"]."/myFolder/"
It should be like below
$files = glob('$_SERVER["DOCUMENT_ROOT"]."/myFolder/*"');
But this is not working
How to correct this?
Actually I am trying to do this:
<?php
//Delete All files from folder
// $files = glob('myFolder/*');

$files = glob($_SERVER["DOCUMENT_ROOT"]."/myFolder/*");

foreach($files as $file){
if(is_file($file))
unlink($file);
} 
?>
Code below is working
$files = glob('myFolder/*');
This below is not working
$files = glob($_SERVER["DOCUMENT_ROOT"]."/myFolder/*");
I want to use absolute path to myFolder

lunes, 2 de octubre de 2017

fecha de publicación[26-09-2017]

Ejercicio upload más base de datos, segundo indicador.
FECHA DE PUBLICACION[2017-19-09]


Ejercicio de upload, archivos en diferentes carpetas,permisos, primer indicador.

CRONOGRAMA

lunes, 18 de septiembre de 2017

Septiembre 11-17 Feria de Bucaramanga- Semana de receso.

miércoles, 6 de septiembre de 2017

[FECHA DE PUBLICACIÓN: 05-09-2017]

Entrega de notas.