Jump to content

PHP rename() problems


jbonnett

Recommended Posts

I have a directory script with each file outputted inside a div,

css

.list {
font-size:75px;
border-bottom:dotted 5px #0F0;
background:#020;
width:100%;
text-align:center;
display:block;
padding:0px;
margin:0px;
}

PHP code to output

echo '
<table>
<tr><td align="center"><a class="list" target="namehere" title="',$file,'" alt="',$file,'" href="mobile_player.php?filename=',($file),'">',$file,' </a></td></tr>
<tr><td class="list1" align="center">
[<a href="../../rename/rename_track(mobile).php?albumname=',$foldername,'/&filename=',$file,'">Change Name</a>]
[<a href="../../delete/delete_track.php?albumname=',$foldername,'/&filename=',$file,'">Delete</a>]</td></tr>
</table>';

 

and every time I use PHP rename() and text is bigger that width:100%; 100% becomes 100%+ rather than staying at 100% and following onto the next line if I dont use php rename() it works the way I want it to any ideas?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/257602-php-rename-problems/
Share on other sites

Simply calling rename() will have absolutely no effect on the HTML or CSS your script generates.

 

The problem is elsewhere. Look at the actual HTML and CSS, before and after, and see what has changed that shouldn't have changed.

Link to comment
https://forums.phpfreaks.com/topic/257602-php-rename-problems/#findComment-1320328
Share on other sites

I found the reason behind it the string (word) length was one whole such as a word of 50 characters so I used PHP wordwrap()

 

$text = "Thequickbrownfoxjumpedoverthelazydog.";

$newtext = wordwrap($text, 20, "<br />\n");

echo $newtext;

 

this adds a break (<br />) or (\n) every 20 characters

Link to comment
https://forums.phpfreaks.com/topic/257602-php-rename-problems/#findComment-1320355
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.