ajannick Posted November 9, 2011 Share Posted November 9, 2011 Hi, I have a Excel File Reader script that works perfectly on my private development hosting, the Excel file is read and then the contents are displayed to the page with the help of a for loop. The trouble is when I try it out on my work's hosting space the script does nothing, no error messages or anything. I have not changed anything and all paths ect are correct. What else could be causing this? Many Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/250768-file-read-script/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 9, 2011 Share Posted November 9, 2011 the script does nothing Producing even a blank page is something and is a symptom that helps point to the cause of the problem. What exactly occurs in front of you when you try it? And if you do get a blank page, what does the 'view source' in your browser show? Do you have php's error_reporting set to E_ALL and display_errors set to ON so that php would report and display any errors it detects? Beyond that, you would need to post the code so that someone could see what it is doing that might be server or server configuration specific. Quote Link to comment https://forums.phpfreaks.com/topic/250768-file-read-script/#findComment-1286584 Share on other sites More sharing options...
ajannick Posted November 9, 2011 Author Share Posted November 9, 2011 Hi, The script runs and seems to stop at the line - $data->read('Senator.xls'); When the page source is viewed the doc tag and open/close body and html tags are there but nothing in between. The script is below: <?php require_once 'Excel/reader.php'; $data = new Spreadsheet_Excel_Reader(); $data->read('Senator.xls'); error_reporting(E_ALL ^ E_NOTICE); echo "<table border='1'>"; echo "<tr><th>First Name</th><th>Middle Name</th><th>Last Name</th><th>Email ID</th></tr>"; for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) { echo "<tr>"; echo "<td>"; echo $data->sheets[0]['cells'][$j+1][1]; echo "</td>"; echo "<td>"; echo $data->sheets[0]['cells'][$j+1][2]; echo "</td>"; echo "<td>"; echo $data->sheets[0]['cells'][$j+1][3]; echo "</td>"; echo "<td>"; echo $data->sheets[0]['cells'][$j+1][4]; echo "</td>"; //echo "<br>"; echo "</tr>"; } echo "</table>"; ?> What checks could be done or changes made to the configuration of the server? Many Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/250768-file-read-script/#findComment-1286587 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.