Internet Marketing Business Forum


Internet Marketing Business Forum » MAIN FORUMS » Web Design & Programming » Deleting Files Dynamically PHP?
Web Design & Programming Building websites, coding scripts or developing apps? html, css, javascripts, ajax, php, asp, java, c+, C++ and other geeky info is here.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-01-2009, 05:25 PM   #1 (permalink)
 Cathy V's Avatar
 
Status: Junior Member
Join Date: Aug 2009
Posts: 1
Cathy V is on a distinguished road
Default Deleting Files Dynamically PHP?

I'm trying to delete a file located on my site's directory at mysite/test.php using unlink()

1. If I write unlink('test.php'), everything works perfectly.
2. If I use a variable for the file like
$a='test.php';
unlink($a) or unlink('$a') or unlink('<? echo $a?>') or unlink('".$a."'),
it's returning an error message.

Can you please give me a hint how I can use a variable instead of a string with the function?

Many thanks.
Cathy V is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:24 AM.
Powered by vBulletin® Version 3.7.0 Beta 6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.


Nav Item BG