I'm developing a website with Laravel in my localhost (in my local server), and in some part of my project I need to upload some XML files to generate a Excel file with phpexcel api. This is how my work proceed:
1 - I create xml files with forms and store them in my public directory in my projects
2- when I want to upload and use those xml files, I'm just taking the name from input and add them to an url to open the file stored localy ( something like this :)
$xml_tmu=simplexml_load_file($url) or die("Error: Cannot create object");
So my question is this: when I will upload my website in a server, do I need to store my xml files in a database so I can use them after, or they will be created in a public directory in the server (like the same thing in my local server)? And if not, what is the best solution to do so ?
fopen()instead of performing an HTTP request to the same server, which is kind of pointless and unnecessary. Then you can pass the contents in to your simple xml. Also,DOMDocumentis way better than simple xml, check it out!