Is it possible to create directory in www.freehyperspace2.com.

<html>
<head></head>
<body>
<?php
$i=190;
$uploaddir = "resumebasket/".$i;
mkdir($uploaddir,0777);
print "created";
?>
</body>
</html>

In this code i'm getting output created.but the directory was not in the site.This access is available in this site.

Recommended Answers

All 8 Replies

Did you refresh your ftp client ? Anyway, If it isn't giving you any error while creating the directory, it should have created the directory. Do a simple check if it exists.

if(is_dir($uploaddir)){ echo "Exists!"; } else { echo "Doesn't exist" ; }

i want to whether all the web site will support this function.i am using freehyperspace................

Umm.. You can create folders. I don't think thats a problem.

in one directory i'm having so many no of uploaed files.Their original path stored in the database.Want to display first top ten uploaded files in one page.

Since you are storing the path in the database, when selecting records order it by id (descending) limiting 10.

$q = "select * from path_table order by id desc limit 0,10";

I hope you have an auto increment field called id in your table.

thanks for ur reply...
i am asking in php point,i want the file to get displayed and not the path.....when the user clicks the file he must able to see......

Huh! When you say you are storing the path in the table, whats the problem then ? Get the path from the table and put it in img tag. <img src='path_of_the_image'>

This works for me:

if ( !mkdir("name",0777,true) ) echo "Create file failed!";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.