Cloud REST API לעריכה מהירה של כל פורמטי המסמכים הפופולריים בכל סוג של יישום PHP מבלי להתקין תוכנה חיצונית כלשהי.
התחל ניסיון חינםGroupDocs.Editor Cloud SDK עבור PHP תומך בעריכה ובמניפולציה של חבורה של פורמטים פופולריים של קבצי מסמכים בתוך יישומי PHP. כל שעליך לעשות הוא לשלב את GroupDocs.Editor Cloud SDK עבור PHP עם GroupDocs.Editor Cloud REST API, להעלות מסמך נתמך בכל עורך WYSIWYG HTML של צד שלישי, לבצע מניפולציות במסמך ולשמור אותו בחזרה לפורמט המסמך המקורי מבלי להפריע למראה לאחר העריכה. ספריית עורך PHP תומכת במגוון פורמטים של מסמכים כולל Microsoft Word (DOC, DOCX, WordML), Excel (XLS, XLSX, SpreadsheetML), מצגות (PPT, PPTX), HTML, XML, TXT ו-OpenDocument.
GroupDocs.Editor Cloud SDK עבור PHP בנוי כשכבה על גבי GroupDocs.Editor Cloud REST API שחוסך זמן פיתוח יקר על ידי ניהול בקשות ברמה נמוכה וטיפול בתגובות. המפתחים יכולים להתמקד בכתיבת הקוד הספציפי רק לפי הצורך בפרויקט.
בדוק את GroupDocs.Editor Cloud SDK עבור PHP ב-GitHub אם אתה מחפש את קוד המקור להוספת הערות לקובץ בענן .
אתה יכול לנסות GroupDocs.Editor ממשקי API של PHP בקוד נמוך ללא כל הגבלה.
GroupDocs.Editor Cloud זמין גם כתמונת Docker שניתן להשתמש בה כדי אירוח עצמי את השירות. לחלופין, תוכל לבנות שירותים משלך באמצעות GroupDocs.Editor APIs High-code המניעים כעת את ממשקי ה-REST API שלנו.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
$AppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$AppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid($AppSid);
$configuration->setAppKey($AppKey);
$editApi = new GroupDocs\Editor\EditApi($configuration);
$fileApi = new GroupDocs\Editor\FileApi($configuration);
// The document already uploaded into the storage
// Load it into editable state
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("Spreadsheet/four-sheets.xlsx");
$loadOptions = new Model\SpreadsheetLoadOptions();
$loadOptions->setFileInfo($fileInfo);
$loadOptions->setOutputPath("output");
$loadOptions->setWorksheetIndex(0);
$loadResult = $editApi->load(new Requests\loadRequest($loadOptions));
// Download html document
$htmlFile = $fileApi->downloadFile(new Requests\downloadFileRequest($loadResult->getHtmlPath()));
$html = file_get_contents($htmlFile->getRealPath());
// Edit something...
$html = str_replace("This is sample sheet", "This is sample sheep", $html);
// Upload html back to storage
file_put_contents($htmlFile->getRealPath(), $html);
$uploadRequest = new Requests\uploadFileRequest($loadResult->getHtmlPath(), $htmlFile->getRealPath());
$fileApi->uploadFile($uploadRequest);
// Save html back to xlsx
$saveOptions = new Model\SpreadsheetSaveOptions();
$saveOptions->setFileInfo($fileInfo);
$saveOptions->setOutputPath("output/edited.xlsx");
$saveOptions->setHtmlPath($loadResult->getHtmlPath());
$saveOptions->setResourcesPath($loadResult->getResourcesPath());
$saveResult = $editApi->save(new Requests\saveRequest($saveOptions));
// Done.
echo "Document edited: " . $saveResult->getPath();