Pramod T P

Search
Skip to content
  • Home
  • PHP
  • WordPress
  • Linux
  • Magento
  • My SQL
  • Profile
  • comments

Daily Archives: May 11, 2012

PHP

disk_total_space

May 11, 2012 Pramod T P

It returns the total size of a filesystem or disk partition

Example

<?php

echo  disk_total_space(“/”);

?>

Output

239940263936

fileFunctionsPHP
PHP

disk_free_space

May 11, 2012 Pramod T P

It returns available space on filesystem or disk partition

Example

<?php

echo  disk_free_space(“/”);

?>

Output

200834342912

fileFunctionsPHP
PHP

dirname

May 11, 2012 Pramod T P

It returns parent directory’s path

Example

<?php

echo  dirname(“/var/www”);

?>


Output

/var

fileFunctionsPHP
PHP

delete

May 11, 2012 Pramod T P

Check unlink() or unset()

fileFunctionsPHP
PHP

copy

May 11, 2012 Pramod T P

It can be used to copy file

Example

<?php

copy(“test.txt”,”test.txt.new”) or die(“Failed to copy the file”);

?>

fileFunctionsPHP
PHP

clearstatcache

May 11, 2012 Pramod T P

It can be used to clears file status cache

Example

<?php

clearstatcache();

?>

fileFunctionsPHP
PHP

chown

May 11, 2012 Pramod T P

It can be used to change file ownership

Example

<?php

chown(“test.txt”, “phpcodez”);

?>

fileFunctionsPHP
PHP

chmod

May 11, 2012 Pramod T P

It can be used to change file permission

Example

<?php

chmod(“/var/www/test/”, 0777);

chmod(“/var/www/test/”, “u+rwx,go+rx”);

?>

fileFunctionsPHP
PHP

chgrp

May 11, 2012 Pramod T P

It can be used to change file group

Example

<?php

$file = ‘test.txt’;

chgrp($file,”php”);

?>

fileFunctionsPHP
PHP

basename

May 11, 2012 Pramod T P

It returns trailing name component of path

Example

<?php

echo basename(“/var/www/php”);

?>


Output

php

fileFunctionsPHP

Posts navigation

← Previous 1 … 3 4

Zend | Magento Certified PHP | eCommerce Architect

For Latest Updates
Visit phpcodez.com

Categories

Recent Posts

  • Regular expression
  • preg_match
  • Redirect root domain to a subdomain .htaccess
  • Redirect root domain to a subfolder .htaccess
  • Force SSL htaccess
May 2012
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Apr   Jun »

Recent Comments

togel online's avatartogel online on How to terminate the current s…
business funding's avatarbusiness funding on compare two strings – ja…
unsecured loans uk's avatarunsecured loans uk on Function to add an element int…
treating back pain's avatartreating back pain on Submit HTML form to pop up pag…
Pura Cleanse's avatarPura Cleanse on Add the block "Based on y…
  • RSS - Posts
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Pramod T P
    • Already have a WordPress.com account? Log in now.
    • Pramod T P
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar