Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.