Note that there are some explanatory texts on larger screens.

plurals
  1. POUndefined Function Call
    primarykey
    data
    text
    <p>I am getting the following error:</p> <blockquote> <p>Call to undefined function convertTextFile()</p> </blockquote> <p>How can I call that specific function?</p> <p>Here's my code:</p> <pre><code>public function post_files() { // $file = Input::file('file'); // your file upload input field in the form should be named 'file' $allowedExts = array("gif", "jpeg", "jpg","htm","html", "ppt","pptx","png","txt","pdf","doc","rtf","docx","xls","xlsx","bmp"); if(isset($_FILES['image']['tmp_name'])) { $i=0; foreach(Input::file('image') as $key =&gt; $file) { $temp = explode(".", $_FILES["image"]["name"][$i]); $extension = end($temp); $filename= $temp[0]; $destinationPath = 'upload/'.$filename.'.'.$extension; $name=$filename.'.'.$extension; if(in_array($extension, $allowedExts)) { if($_FILES["image"]["error"][$i] &gt; 0) { echo "Return Code: " . $_FILES["image"]["error"][$i] . "&lt;br&gt;"; } $sql=Author::check_document_details_Call($name); $exist=$sql[0]-&gt;result; if($exist == "1") { echo $filename." already exists.&lt;br&gt; "; } else { $uploadSuccess=move_uploaded_file($_FILES["image"]["tmp_name"][$i],$destinationPath); if( $uploadSuccess ) { if($extension=='txt') { convertTextFile($destinationPath,"uploads/".$filename.".html"); $filename=$extension.".html"; } $document_details=Response::json(DocumentProperty::insert_document_property_Call($name,$destinationPath)); echo "Update ".$name." successfully!!&lt;br&gt;"; } else { return Response::json('error', 400); } } } $i++; } } } function convertTextFile($inputFileName,$outputFileName) { convertTxtToHtml($inputFileName,$outputFileName); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload