Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-26-2009, 03:03 PM need help.. urgent:(
Novice Talker

Posts: 10
Name: Muhammad Umer Farooq
Trades: 0
Hi again guyzz.. i wrote this script to open dir on my windows directory but it is not working.. as i am using windows so i can use both forward slash or backward slash but not working.. giving errors.. can some one tell me where is the problem?

Code:
<?
$dir_name = "D:\xampp\htdocs\Opendir";
$dir = opendir($dir_name);
$file_list ="<ul>";
while ($file_name = readdir($dir)){
if (($file_name != "." && ($file_name != "..")){
$file_list .= "<li>$file_name";
}
}
$file_list .= "<ul>";
closedir($dir);
 
 
echo "$dir_name";
echo "$file_list";
 
?>
omerfarooq123 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-26-2009, 03:13 PM Re: need help.. urgent:(
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And the errors would be?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-26-2009, 05:47 PM error
Novice Talker

Posts: 10
Name: Muhammad Umer Farooq
Trades: 0
Parse error: parse error in D:\xampp\htdocs\lesson9\disp.php on line 8
omerfarooq123 is offline
Reply With Quote
View Public Profile
 
Old 12-26-2009, 06:16 PM Re: need help.. urgent:(
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Wrong number of brackets. It should be
PHP Code:
if ($file_name != "." && $file_name != ".."){ 
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to need help.. urgent:(
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.66312 seconds with 12 queries