Hi all, have a question here. I am trying to run a code in CC body. what i am trying is just to get the file size of a file which name is stored in database table within field file_name.
<?php $a="images/stories/{file_name}"; $b=filesize($a) ?>
later in the code i am showing $b
<?php echo $b ?>
...and its a failure.
...but if i hardcode the file name in $a lets say "images/stories/myfile.zip" then its echo the file size correctly.
why is it not working with field name.
<?php $a="images/stories/{file_name}"; $b=filesize($a) ?>
later in the code i am showing $b
<?php echo $b ?>
...and its a failure.
...but if i hardcode the file name in $a lets say "images/stories/myfile.zip" then its echo the file size correctly.
why is it not working with field name.
<?php $a="images/stories/{file_name}"; $b=filesize($a) ?>
ah...i got the answer..... $a should b "images/stories/$row->file_name"
thanx anywayzzzzz....chrono products are awesome....I promise to buy these products if i get something from my website.
...now i am looking to convert the result into mb as it is in bytes right now.
This topic is locked and no more replies can be posted.